Repository navigation
feat: portfolio index site generator #1
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: Build and deploy portfolio | |
| # SECURITY: this workflow may later read the private org Project board via a PAT. | |
| # Never add `pull_request` or `pull_request_target` triggers here — a fork PR | |
| # would then run with access to that secret. | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "17 6 * * *" # nightly, 06:17 UTC | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [portfolio-refresh] # fired when a board item is flagged Portfolio=Yes | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build site | |
| run: python build.py | |
| - name: Stage output | |
| run: | | |
| mkdir -p _site | |
| cp index.html _site/ | |
| if [ -d assets ]; then cp -r assets _site/; fi | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |