Use embedded snippets in docs #195
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: 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 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 | |
| - name: Build documentation | |
| run: uvx --with tox-uv tox -e docs | |
| - name: Upload documentation as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: site | |
| publish-docs: | |
| name: Publish | |
| 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 |