Skip to content

Only deploy docs to GitHub Pages on push to master - #90

Merged
mosbth merged 1 commit into
masterfrom
fix/docs-deploy-on-pr
Aug 23, 2026
Merged

Only deploy docs to GitHub Pages on push to master#90
mosbth merged 1 commit into
masterfrom
fix/docs-deploy-on-pr

Conversation

@mosbth

@mosbth mosbth commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Every PR shows a permanent red X on the "Deploy API documentation to github
pages" job. Root cause: the github-pages environment has a custom branch
deployment policy that only allows deployments from master
(confirmed via gh api repos/mosbth/irc2phpbb/environments/github-pages),
so the deploy job is rejected outright — no steps even run — whenever the
workflow triggers on a PR branch.

This gates the deploy job to github.event_name == 'push' && github.ref == 'refs/heads/master'. The build job (which actually runs
pdoc) still runs on every push and PR, so a broken docs build is still
caught before merge — only the deploy step, which could never succeed off
master anyway, is skipped.

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
mosbth merged commit 9816cc7 into master Aug 23, 2026
8 of 9 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant