name: docs on: push: branches: - main tags: - 'v*' permissions: contents: write env: UV_FROZEN: "1" jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.13' - name: Install uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: version: "0.12.1" - name: Build Sphinx Documentation run: uv run --group docs sphinx-multiversion docs docs/_build - name: Add root redirect run: echo '' > docs/_build/index.html - name: Remove Sphinx build artifacts run: find docs/_build -type d -name .doctrees -exec rm -rf {} + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_build/ keep_files: true