Fetch/Publish occupancy-forecast-json-dataset #93
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: Fetch/Publish occupancy-forecast-json-dataset | |
| on: | |
| schedule: | |
| - cron: '0 5 * * 1-5' # daily, MON-FRI | |
| workflow_dispatch: # Allows manual trigger | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false # queue instead of cancel | |
| jobs: | |
| fetch-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout current repo | |
| uses: actions/checkout@v4 | |
| - name: Install Python (venv) | |
| run: bash ./cli-common-setup-python.sh | |
| - name: Override .env values | |
| run: | | |
| echo "OTD_KEY=${{ secrets.OTD_KEY }}" >> $GITHUB_ENV | |
| - name: Fetch dataset | |
| run: | | |
| bash ./cli-fetch-occupancy-forecast.sh | |
| - name: Prepare site | |
| run: | | |
| bash ./cli-common-create-site.sh occupancy-forecast-json-dataset | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |