Generate and Deploy to GitHub Pages #78
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: Generate and Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 6 * * *" # Daily at 6 AM UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required for gh-pages deployment | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and Python | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Generate static HTML | |
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| run: | | |
| mkdir -p data | |
| uv run cfp-radar collect --no-ai data/index.html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./data | |
| publish_branch: gh-pages |