Build and Deploy Static Site #42
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 Static Site | |
| on: | |
| push: | |
| branches: | |
| - gh_pages | |
| schedule: | |
| - cron: "0 3 * * *" # runs daily at 3:00 UTC | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install pip dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install uv | |
| - name: Run project build | |
| run: uv run python -m bin.build | |
| - name: Run database creation | |
| run: uv run python -m bin.create_db | |
| - name: Upload static site artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: static-site | |
| path: dist/ |