Repository navigation
ci(docs): build on pull requests, and serialise gh-pages deploys - #7
Merged
Merged
Conversation
The workflow ran only on pushes to main, so a pull request touching the
docs or requirements.txt got no signal at all -- nothing could say whether
it was safe to merge. That is not hypothetical here: this repository has
open dependency PRs whose checks read "no checks", which is not the same
thing as green and must not be merged as if it were.
Two changes:
- a build job on every pull request, running `mkdocs build --strict` so a
broken link or an unknown config key fails rather than warning into a
log nobody reads;
- deploy is now guarded by `if: push || workflow_dispatch` and `needs:
build`, so a pull request stops after building and never pushes
gh-pages, plus a `gh-pages-deploy` concurrency group with
cancel-in-progress FALSE, because two concurrent `mike deploy --push`
runs end in `! [rejected] gh-pages -> gh-pages (fetch first)` and
killing a publish half way through is worse than making it wait.
The build job reuses the python version and action pins already in this
file rather than fresh ones, so it neither contradicts the deploy job nor
opens a new Renovate PR.
Verified before being applied: `mkdocs build --strict` was run locally
against this site, and against all 168 ungated docs repos in the fleet.
All 168 passed, which is why this lands green rather than red.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The workflow ran only on pushes to main, so a pull request touching the docs or
requirements.txtgot no signal at all — nothing could say whether it was safe to merge.That is not hypothetical here: this repository has open dependency PRs whose checks read "no checks", which is not the same thing as green and must not be merged as if it were.
Two changes
buildjob on every pull request, runningmkdocs build --strictso a broken link or an unknown config key fails rather than warning into a log nobody reads.deployis now guarded byif: push || workflow_dispatchandneeds: build, so a pull request stops after building and never pushesgh-pages— plus agh-pages-deployconcurrency group withcancel-in-progress: false, because two concurrentmike deploy --pushruns end in! [rejected] gh-pages -> gh-pages (fetch first), and killing a publish half way through is worse than making it wait.The build job reuses the python version and action pins already in this file rather than fresh ones, so it neither contradicts the deploy job nor opens a new Renovate PR.
Verified before being applied, not after
mkdocs build --strictwas run locally against this site and against all 168 ungated docs repos in the fleet. All 168 passed — which is why this lands green rather than red.That order matters: the build job runs on pushes to main too, so gating a site that does not build strictly would turn its main branch red.
🤖 Generated with Claude Code