Skip to content

ci(docs): build on pull requests, and serialise gh-pages deploys - #1

Merged
tannevaled merged 1 commit into
mainfrom
ci/build-docs-on-pull-request
Aug 17, 2026
Merged

ci(docs): build on pull requests, and serialise gh-pages deploys#1
tannevaled merged 1 commit into
mainfrom
ci/build-docs-on-pull-request

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The docs workflow ran only on push to main and on workflow_dispatch, so a pull request touching mkdocs.yml, the prose or requirements.txt produced no check at all. A dependency bump had no signal, and there was no basis on which to merge it — which is why the dependency PRs here have been sitting.

  • build now runs on every pull request and on main, with mkdocs build --strict so a broken link or an unknown config key fails instead of warning into the void.
  • deploy keeps the mike publish, gated to push / workflow_dispatch, so a pull request stops after the build and never touches gh-pages.
  • deploy also takes a concurrency group. mike deploy --push writes gh-pages, so two deploys at once cannot both win — the second is rejected with ! [rejected] gh-pages -> gh-pages (fetch first), as happened on go-ruby-zlib/docs when several dependency PRs merged seconds apart. cancel-in-progress is false on purpose: killing a publish half way through is worse than making it wait.

Piloted and proven on go-ruby-zlib/docs: the gate turned four two-month-old dependency PRs from unverifiable into green, and they merged. The build job mirrors whatever this repo's deploy job already pins — same interpreter, same action versions — so it adds no new bump for Renovate to chase.

🤖 Generated with Claude Code

The docs workflow ran only on push to main and on workflow_dispatch, so a pull
request touching mkdocs.yml, the prose or requirements.txt produced NO check at
all -- a dependency bump had no signal, and nothing could say whether it was safe
to merge.

Split the job in two. build runs on every pull request and on main, with
mkdocs build --strict so a broken link or an unknown config key fails rather than
warning into the void. deploy keeps the mike publish, gated to push and
workflow_dispatch, so a pull request stops after the build and never touches
gh-pages.

deploy also takes a concurrency group. mike deploy --push writes gh-pages, so two
deploys at once cannot both win -- the second is rejected with
'! [rejected] gh-pages -> gh-pages (fetch first)', as happened on
go-ruby-zlib/docs when several dependency PRs merged seconds apart.
cancel-in-progress stays false: killing a publish half way through is worse than
making it wait.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 9676d30 into main Aug 17, 2026
2 checks passed
@tannevaled
tannevaled deleted the ci/build-docs-on-pull-request branch August 17, 2026 14:49
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