Builder #84693
This file contains hidden or 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: Builder | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: "0/30 * * * *" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Build the website with the latest contents | |
| uses: ./action-build | |
| with: | |
| API_KEY: ${{ secrets.API_KEY }} | |
| - name: Commit changed files | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add docs/\* | |
| set +e | |
| git status | grep 'modified\|new file' | |
| if [ $? -eq 0 ] | |
| then | |
| set -e | |
| git commit -am "build the website with the latest source data - $(date)" | |
| else | |
| set -e | |
| echo "No changes since last run" | |
| fi | |
| - name: Push changes | |
| uses: ad-m/github-push-action@v0.6.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |