From bd0327b95864fc27a271522878195e5d260dbc49 Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Sun, 23 Aug 2026 22:38:15 +0200 Subject: [PATCH] Only deploy docs to GitHub Pages on push to master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The github-pages environment has a branch deployment policy that only allows master, so the deploy job was always failing outright (rejected before any step ran) whenever the workflow triggered on a PR branch — visible as a permanent red X on every PR. Gate the job to push events on master; the build job still runs on PRs so a broken pdoc build is still caught early. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Ax5CKcNH5hwbYNJoRGLyAC --- .github/workflows/documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 87013e3..ec17801 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -32,6 +32,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 1 needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/master' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}/pdoc