Build and deploy to Github pages #1619
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 and deploy to Github pages | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Run at midnight every day (UTC) | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
with: | |
persist-credentials: false | |
- name: Install and Build | |
run: | | |
npm install | |
npm run build | |
npm run export | |
npm run nojekyll | |
npm run cname | |
npm run copy-ratings | |
- name: Commit files | |
run: | | |
git config --local user.email ${{ secrets.ACTION_BUILD_EMAIL }} | |
git config --local user.name ${{ secrets.ACTION_BUILD_NAME }} | |
git add -A | |
git commit -m "Update page" | |
- name: Push changes | |
uses: ad-m/github-push-action@master # https://github.com/ad-m/github-push-action | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |