Update #1728
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: Update | |
| on: | |
| push: | |
| branches: [ main ] | |
| schedule: | |
| # Runs at 2:00 UTC every day (to give the release process 2h to complete). | |
| - cron: '0 2 * * *' | |
| jobs: | |
| update-data: | |
| name: Update Data | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| env: | |
| # Enforce subresource integrity for Deno modules | |
| # https://deno.land/manual@v1.15.3/linking_to_external_code/integrity_checking | |
| DENO_RUN: deno run --lock=lock.json --cached-only | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v3 | |
| - name: Checkout the latest data | |
| uses: actions/checkout@v3 | |
| with: | |
| path: data | |
| ref: data | |
| - name: Install dependencies | |
| run: | | |
| sh .github/etc/install-deno.sh | |
| rustup --version | |
| - name: Reload Deno cache | |
| run: deno cache --reload --lock=lock.json deps.ts | |
| - name: Update the data | |
| run: $DENO_RUN -A update-data.ts | |
| - name: Push the new data | |
| run: | | |
| cd data | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| # Commit and push only if a change is made | |
| git add . | |
| { git commit -m 'Update data' && git push; } || true | |
| - name: Render the website | |
| run: | | |
| $DENO_RUN -A build-web.ts | |
| touch build/.nojekyll | |
| - name: Deploy the website | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: build | |
| single-commit: true | |
| - name: Fail if the latest toolchain is failing | |
| run: $DENO_RUN -A alerter.ts |