From bb08a412cfff00e35895b4138bf2db2b044484e9 Mon Sep 17 00:00:00 2001 From: Frederic Samier Date: Thu, 6 Aug 2026 15:34:41 +0200 Subject: [PATCH 1/2] Revert "Build and deploy docs only on push to main (#322)" This reverts commit d77a31a9d0a580dc3c336f44eb24b44e8e07addd. --- .github/workflows/ci.yml | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09621196..1e0e2a89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,14 +73,21 @@ 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" + # ────────────────────────────────────────────────────────────────── - # Build & deploy docs — only on push to main + # Deploy docs — only on push to main # ────────────────────────────────────────────────────────────────── deploy-docs: name: deploy docs @@ -88,32 +95,16 @@ jobs: 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: Checkout + - name: Download docs artifact timeout-minutes: 10 - uses: actions/checkout@v7 + uses: actions/download-artifact@v8 with: - 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: docs-build + path: "./docs/build" - name: Setup Github Pages timeout-minutes: 10 @@ -126,6 +117,5 @@ jobs: path: "./docs/build" - name: Deploy GitHub Pages - id: deployment timeout-minutes: 10 uses: actions/deploy-pages@v5 From ce6726be97251a71f7b76a72adfe6e410952ecd2 Mon Sep 17 00:00:00 2001 From: Frederic Samier Date: Thu, 6 Aug 2026 15:35:02 +0200 Subject: [PATCH 2/2] Fix docs deploy: add github-pages environment --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e0e2a89..5b4521d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,6 +95,9 @@ jobs: needs: ci runs-on: ubuntu-latest timeout-minutes: 30 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} permissions: pages: write id-token: write @@ -117,5 +120,6 @@ jobs: path: "./docs/build" - name: Deploy GitHub Pages + id: deployment timeout-minutes: 10 uses: actions/deploy-pages@v5