Skip to content

Deploy the document site on every change of docs - #49

Merged
tamada merged 1 commit into
mainfrom
ci/deploy-page
Aug 7, 2026
Merged

tamada merged 1 commit into
mainfrom
ci/deploy-page

Conversation

@tamada

@tamada tamada commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Takes the workflow you added, and hands its body to the reusable
build-hugo-and-publish.yaml@v1 — the same one the release used.

What the copied workflow would have hit

actions/upload-pages-artifact@v3 with actions/deploy-pages@v5 not of the same generation; v5 pairs with v5
no concurrency group Pages rejects a second deployment in flight rather than queueing it, and this workflow and the release both fire on the merge of a release branch
hugo-version: 0.158.0 fine — it was checked, see below

Its trigger is kept as it was: the push to main which touches docs, and the
manual dispatch.

The site is deployed here now, not by the release

The documents job is dropped from publish.yaml. A release changes the version
badges under docs, so both would have run on the same merge and raced for the
single deployment Pages allows.

A fix of the documents now reaches the site without waiting for a release, which
is the other half of why this is worth splitting.

Hugo

Pinned at 0.158.0. The blowfish theme of docs/go.mod declares 0.141.0 to
0.154.5; 0.141.0, 0.154.5, and 0.158.0 were each run against this site in a
container, and all of them build it. Pinning is deliberate: latest is 0.164.0
today, which nobody has tried here, and a failure would only show up as a site
which quietly stops updating.

After merging

The live site still tells v2.0.5. Running this workflow by hand brings it to
3.0.0.

gh workflow run deploy-page.yaml --ref main

Also drops prepare_site_build of the Justfile, which made a worktree of
gh-pages on docs/public; nothing serves from that branch any more.

🤖 Generated with Claude Code

The site was deployed by the release only, hence, a fix of the documents did
not reach the site until the next release. Deploy it on the push to main which
touches docs, and by hand through the dispatch.

The job calls build-hugo-and-publish of tamada/.github, as the release did. The
copied workflow it replaces did the same by its own steps, with two problems:
it paired actions/upload-pages-artifact@v3 with actions/deploy-pages@v5, which
are not of the same generation, and it had no concurrency group, while Pages
rejects a second deployment in flight rather than queueing it.

The documents job is dropped from the publish workflow with this. Both of them
would run on the merge of a release branch, since a release changes the version
badges of docs, and the two deployments would race for the single one Pages
allows.

Hugo is pinned at 0.158.0. The blowfish theme of docs/go.mod tells it works up
to 0.154.5, and 0.158.0 builds this site as well; both were checked in a
container. Pinning keeps a new Hugo from breaking the deployment unasked.

Also drop prepare_site_build of the Justfile. It made a worktree of gh-pages on
docs/public, which nothing serves from since Pages serves what a workflow
uploads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tamada
tamada merged commit 2bea7ea into main Aug 7, 2026
8 checks passed
@tamada
tamada deleted the ci/deploy-page branch August 7, 2026 11:43
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