Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 23 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,38 +73,47 @@ jobs:
path: tests/.tests.xml
include-hidden-files: true

# Build docs on every PR to catch errors early (no artifact upload).
- name: Build docs
timeout-minutes: 10
if: ${{ !cancelled() }}
run: pdm run docs

- name: Upload docs artifact
timeout-minutes: 10
if: ${{ !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v7
with:
name: docs-build
path: "./docs/build"

# ──────────────────────────────────────────────────────────────────
# Deploy docs — only on push to main
# Build & deploy docs — only on push to main
# ──────────────────────────────────────────────────────────────────
deploy-docs:
name: deploy docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: ci
runs-on: ubuntu-latest
timeout-minutes: 30
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Download docs artifact
- name: Checkout
timeout-minutes: 10
uses: actions/download-artifact@v8
uses: actions/checkout@v7
with:
name: docs-build
path: "./docs/build"
fetch-depth: 0
submodules: "recursive"

- name: Setup mise
timeout-minutes: 10
uses: jdx/mise-action@v4.2.3

- name: Install dependencies
timeout-minutes: 10
run: pdm install --dev --check --frozen-lockfile

- name: Build docs
timeout-minutes: 10
run: pdm run docs

- name: Setup Github Pages
timeout-minutes: 10
Expand All @@ -117,5 +126,6 @@ jobs:
path: "./docs/build"

- name: Deploy GitHub Pages
id: deployment
timeout-minutes: 10
uses: actions/deploy-pages@v5
Loading