Fetch/Publish Business Organisations #92
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 Business Organisations | |
| on: | |
| schedule: | |
| - cron: '35 12 * * 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 BO | |
| run: | | |
| bash ./cli-common-fetch-dataset.sh business-organisations full-business-organisation | |
| - name: Prepare site | |
| run: | | |
| bash ./cli-common-create-site.sh business-organisations | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |