Skip to content

Deploy the site from main, never from a release tag - #91

Merged
marcosqlbi merged 1 commit into
mainfrom
fix/deploy-site-from-main
Sep 2, 2026
Merged

Deploy the site from main, never from a release tag#91
marcosqlbi merged 1 commit into
mainfrom
fix/deploy-site-from-main

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

The retry from #84 does not work. Dev 3286 was its first real test: it deployed, the site was stale, it deployed again, and the site was still stale. That run is also what finally identified the cause.

A Pages deployment made from a tag is not served unless it is the first deployment of that commit. One made from a branch supersedes whatever is live, first or not. Commit f169379 settles it:

time ref outcome
13:59 main went live
14:20 tag v1.2.2-dev.3286 stalled, and stalled again on the retry

By the time a release is published, its commit has usually been deployed from main already — the release tag, the pre-release tag and main are all one commit — so the release's own deployment is created, reported as succeeded by deploy-pages, and never served. Across the runs since the verify step existed: pushes 9 of 9, manual runs 8 of 8, release-triggered runs 7 of 23.

So a release no longer deploys the site. The new redeploy job asks this same workflow to run on main, passing the release tag as an input so -ExpectTag still stops the manifests being written before the release is listed. workflow_dispatch is one of the two events GitHub exempts from the rule that GITHUB_TOKEN cannot start another workflow run, so no personal access token is needed. A release now produces two runs: a three-line dispatcher on the tag, and the deployment on main.

The retry is removed rather than left beside the real fix. It is known not to work for the only failure it ever targeted, and leaving both in would make it unclear which one was doing the work. The verify step stays — that is what catches the problem.

Also clears the Node 20 deprecation warnings, which the runners already force to Node 24: configure-pages v5→v6, deploy-pages v4→v5, upload-pages-artifact v3→v5. The last is what drops the transitive upload-artifact@v4. Note upload-pages-artifact v4 stopped including dotfiles in the artifact — site/ has none, so nothing is silently dropped, and there is a comment saying what to do if one is ever added.

Because the release path no longer sees the release event, the changelog check now reads the tag from the input and decides from its shape: v1.2.2 is checked, v1.2.2-dev.3286 is skipped as a pre-release, empty means this is not a release deployment. All four branches were exercised locally, including that an unwritten version exits 1.

This cannot be fully proved until the next release — the dispatcher only runs on a release event. What a merge does prove is the deploy path itself: the same steps on main, on the new action versions.

🤖 Generated with Claude Code

Publish site has failed on almost every release, and the retry added in
#84 did not fix it: dev 3286 deployed twice from its tag and the site
took neither.

That run also identified the cause. A Pages deployment made from a tag
is not served unless it is the first deployment of that commit; one made
from a branch supersedes whatever is live, first or not. Commit f169379
settles it - deployed from main at 13:59 it went live, deployed from tag
v1.2.2-dev.3286 at 14:20 it stalled, twice. By the time a release is
published its commit has usually been deployed from main already, so the
release's own deployment is created, reported as succeeded, and dropped.

A release therefore no longer deploys. It asks this workflow to run on
main and that run deploys, carrying the tag as an input so the manifests
still wait for the release to appear. workflow_dispatch is one of the two
events exempt from the rule that GITHUB_TOKEN cannot start another run,
so this needs no personal access token.

The retry is removed rather than left beside the real fix: it is known
not to work for the only failure it ever targeted, and keeping it would
make it unclear which of the two was doing the work.

Also moves off Node 20, which the runners now force to Node 24 anyway:
configure-pages v5 to v6, deploy-pages v4 to v5, upload-pages-artifact
v3 to v5 - the last of which is what drops the transitive upload-artifact
v4. site/ has no dotfiles, so the change in upload-pages-artifact v4 that
excludes them from the artifact drops nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit d490ede into main Sep 2, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the fix/deploy-site-from-main branch September 2, 2026 15:55
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