Build & Deploy #68
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 & Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_run: | |
| workflows: ["Process Project Submission"] | |
| types: | |
| - completed | |
| jobs: | |
| # Build job | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v5 | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Generate website | |
| run: uv run generator.py | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| # Deployment job | |
| deploy: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{steps.deployment.outputs.page_url}} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |