Merge pull request #16 from lbliii/dependabot/github_actions/actions/… #55
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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.14t" | |
| - name: Cache uv dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| uv-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: uv sync --group dev --group docs | |
| env: | |
| PYTHON_GIL: "0" | |
| - name: Get cache hash | |
| id: cache | |
| working-directory: site | |
| run: echo "hash=$(uv run bengal cache hash)" >> $GITHUB_OUTPUT | |
| env: | |
| PYTHON_GIL: "0" | |
| - name: Cache Bengal build state | |
| uses: actions/cache@v5 | |
| with: | |
| path: site/.bengal | |
| key: bengal-${{ runner.os }}-${{ steps.cache.outputs.hash }} | |
| - name: Build documentation site | |
| working-directory: site | |
| run: uv run bengal site build --environment production | |
| env: | |
| PYTHON_GIL: "0" | |
| - name: Prepare for upload | |
| run: | | |
| touch site/public/.nojekyll | |
| echo "" > site/public/.gitignore | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: site/public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |