Only deploy docs to GitHub Pages on push to master - #90
Merged
Conversation
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ax5CKcNH5hwbYNJoRGLyAC
mosbth
added a commit
that referenced
this pull request
Aug 23, 2026
Pulls in the docs-deploy-on-PR fix from #90. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ax5CKcNH5hwbYNJoRGLyAC
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every PR shows a permanent red X on the "Deploy API documentation to github
pages" job. Root cause: the
github-pagesenvironment has a custom branchdeployment policy that only allows deployments from
master(confirmed via
gh api repos/mosbth/irc2phpbb/environments/github-pages),so the
deployjob is rejected outright — no steps even run — whenever theworkflow triggers on a PR branch.
This gates the
deployjob togithub.event_name == 'push' && github.ref == 'refs/heads/master'. Thebuildjob (which actually runspdoc) still runs on every push and PR, so a broken docs build is stillcaught before merge — only the deploy step, which could never succeed off
masteranyway, is skipped.