static #184
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: static | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- run: | | |
cd web | |
npm install | |
npm run lint | |
npm run build | |
cd ../static | |
rm -rf .gitignore | |
git init . | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git add . | |
git commit -a -m "Static build on $(date)" | |
git branch -m static | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true | |
directory: static | |
branch: static |