Merge pull request #7 from tomjn/patch-1 #14
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: Build | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- name: Build | |
shell: bash | |
run: | | |
npm install | |
npm run build | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: www | |
- name: Update gh-pages branch | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
cp *.* www/ | |
cp -rf src www/ | |
cp -rf dist www/ | |
cd www | |
git add -f dist | |
git commit -am 'Autobuild' | |
git push |