Skip to content

ci: publish the release docs from the release run - #6174

Merged
max-sixty merged 2 commits into
PRQL:mainfrom
max-sixty:simplify-web-publish
Aug 9, 2026
Merged

ci: publish the release docs from the release run#6174
max-sixty merged 2 commits into
PRQL:mainfrom
max-sixty:simplify-web-publish

Conversation

@max-sixty

@max-sixty max-sixty commented Aug 9, 2026

Copy link
Copy Markdown
Member

release.yaml reached the docs publish indirectly: push-web-branch force-pushed the release commit to web with the bot's PAT, purely so that push would start publish-web.yaml. Both hops sit behind a required reviewer, so the docs took two approvals in two separate runs to go out.

release.yaml now calls publish-web.yaml directly and builds from the release tag, which holds the same tree web was carrying. push-web-branch still moves web, since that's the base doc-only fixes backport onto, but with the default token: it needs no environment, and its push starts no second publish. So the docs path goes from two gated jobs across two runs to one gated job in the release run.

The remaining gate on github-pages can't be removed while the release event is the trigger: tend treats on: release as bot-steerable, so a deployment-branch policy can never gate an environment the release reaches, and actions/deploy-pages requires both id-token: write and the github-pages environment.

One smaller piece rides along: a callee can't request a scope its caller lacks, so both call sites of publish-web.yaml now grant the pages and id-token scopes actions/deploy-pages needs — tests.yaml's pr-publish-web path was missing them too.

One consequence worth naming. The release's web build now runs on a tag rather than on web, and cache scoping lets a web run restore only web's own caches and main's. main's version has bumped by the time a backport lands, so its key no longer matches, which makes the first web build after a release a cold one. Backports are rare enough — the last was October 2024 — that this looked cheaper than the alternatives.

Nothing on the release path can be exercised without cutting a release. If publish-web ever fails in a release run, re-running that job or dispatching publish-web on the tag recovers it.

This was written by Claude Code on behalf of max-sixty

Until now `release.yaml` reached `publish-web.yaml` indirectly: it force-pushed the release commit to `web` with the bot's PAT so that push would start `publish-web`. Both hops sit behind a required reviewer, so the docs took two approvals to go out.

`release.yaml` now calls `publish-web.yaml` directly and builds from the release tag, which holds the same tree `web` was carrying. `push-web-branch` still moves `web`, since that's the base doc-only fixes backport onto, but with the default token: it needs no environment, and its push starts no second publish.

The callee can't request a scope its caller lacks, so both call sites grant the `pages` and `id-token` scopes `actions/deploy-pages` needs. `build-web` saves its cache on tags too, so the next `web` build still starts from the release's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@prql-bot prql-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One point on the build-web cache change; the rest reads correctly to me.

GitHub scopes caches by ref — a run can only restore caches created on the current ref or the default branch, and the caching reference calls tags out explicitly ("Workflow runs also cannot restore caches created for different tag names"). So a cache saved on refs/tags/0.13.x isn't visible to a later run on refs/heads/web; that run restores main's cache, which save-if already covered. The tag save does still warm a re-run of the release job or the workflow_dispatch-on-the-tag recovery you describe in the description, so keeping it is reasonable — it's the comment that promises something the scoping rules don't deliver.

Comment thread .github/workflows/build-web.yaml Outdated
Caches are scoped by ref: a run on `refs/heads/web` can restore only `web`'s own caches and the default branch's, never a tag's. So saving on the release tag didn't warm the next `web` build as the comment claimed. What it did warm — a re-run of the release's own build, or a `publish-web` dispatch on the same tag — doesn't earn a multi-GB entry per release against the repo's 10 GB cache budget.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 193d3b2 into PRQL:main Aug 9, 2026
89 checks passed
@max-sixty
max-sixty deleted the simplify-web-publish branch August 9, 2026 20:24
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.

2 participants