Enable the UP (pyupgrade) Ruff rules and use Python 3.8+ code, including in docs
#121
Workflow file for this run
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 Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: 1 | |
| UV_NO_SYNC: 1 | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-docs: | |
| name: Build documentation | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5 | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group docs | |
| - name: Build documentation | |
| run: uv run zensical build | |
| - name: Upload documentation as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: site | |
| publish-docs: | |
| name: Publish documentation | |
| runs-on: ubuntu-24.04 | |
| needs: [ build-docs ] | |
| permissions: | |
| pages: write # Required for GitHub Pages deployment | |
| id-token: write # Required for GitHub Pages deployment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| if: ${{ github.event_name == 'release' }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |