Bump actions/checkout from 3 to 4 (#258) #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- default | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: lts/* | |
- name: Install | |
run: npm install | |
- name: Run tests | |
run: npm test | |
- name: Build example | |
run: | | |
npm run example | |
mkdir _deploy | |
cp example/bundle.js example/index.html _deploy | |
- name: Publish site | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v1 | |
with: | |
target_branch: gh-pages | |
build_dir: _deploy | |
keep_history: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |