Skip to content

ci: build the deployed site the same way CI verifies it - #324

Merged
e-minguez merged 3 commits into
mainfrom
deploy-parity
Sep 6, 2026
Merged

ci: build the deployed site the same way CI verifies it#324
e-minguez merged 3 commits into
mainfrom
deploy-parity

Conversation

@e-minguez

Copy link
Copy Markdown
Owner

Mirrors rke2-versions#242 so both repos are configured identically.

The problem

The deploy ran through enriikke/gatsby-gh-pages-action@v2, which runs npm install, not npm ci (await i.exec(\${u} install`, [], { cwd: r })), re-resolving dependencies and ignoring the committed lockfile — using whatever Node was on the runner PATH, since the deploy job never ran setup-node. CI validates the lockfile on every PR and the deploy then ignored it, so a green ci-okdid not guarantee the published site was built from the tree that passed. The action is unmaintained and still declares the retirednode16` runtime.

The fix

  • setup-node pinned to 24, matching ci.yaml
  • npm ci against the committed lockfile
  • npm run build -- --prefix-paths, same args as before
  • Publish with the first-party Pages actions; configure-pages flips the Pages source on the first successful run, so the existing gh-pages content keeps serving until the new deploy succeeds

No in-repo CNAME (cname: null) — the custom domain is inherited from the user-level Pages site and is unaffected.

msgpackr bump

Node 24 could not work here at all before this: the lockfile pinned msgpackr 1.10.1, which calls Buffer.utf8Write in a way Node 24 rejects, crashing gatsby build inside Gatsby's lmdb datastore. Bumped to 1.12.1, which stays inside the ^1.5.4 range lmdb 2.5.3 already asks for — no package.json change, lockfile only. This is the same version lockFileMaintenance arrived at on its own in rke2-versions.

Verified locally on Node 25: build completes.

Also

🤖 Generated with Claude Code

https://claude.ai/code/session_011hJ7bUefyiu9bjVZ914Kz4

e-minguez and others added 3 commits September 6, 2026 10:33
Mirrors e-minguez/rke2-versions so both repos are configured identically.

The deploy went through enriikke/gatsby-gh-pages-action@v2, which runs
`npm install` (not `npm ci`) with whatever Node happens to be on the runner
PATH. CI validated the lockfile on every PR and the deploy then ignored it,
so a green gate did not actually guarantee the published site was built from
the tree that passed.

Build explicitly instead: pin Node to 24 to match ci.yaml, npm ci against the
committed lockfile, and gatsby build --prefix-paths. Publish with the
first-party Pages actions rather than pushing to a gh-pages branch;
configure-pages switches the Pages source over on the first successful run,
so there is no window where nothing is served.

Bump msgpackr to 1.12.1 within lmdb's existing range so Node 24 works at all:
1.10.1 calls Buffer.utf8Write in a way Node 24 rejects, crashing gatsby build
in Gatsby's lmdb datastore. Verified locally on Node 25.

Also align setup-python to v7 and add .github/workflows/main.yaml to the
frontend path filters, so a change to the deploy path rebuilds the site.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011hJ7bUefyiu9bjVZ914Kz4
The previous commit regenerated package-lock.json with Node 25's npm, which
resolves the @emnapi optional dependencies differently. npm ci then failed on
CI under Node 24 with "Missing: @emnapi/core@1.11.3 from lock file".

Regenerate under Node 24.20.0 / npm 11.19.0 to match the version CI runs.
Verified there: npm ci succeeds and gatsby build completes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011hJ7bUefyiu9bjVZ914Kz4
Matches rke2-versions. configure-pages leaves the Pages source alone unless
enablement is set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011hJ7bUefyiu9bjVZ914Kz4
@e-minguez
e-minguez merged commit daa9033 into main Sep 6, 2026
4 checks passed
@e-minguez
e-minguez deleted the deploy-parity branch September 6, 2026 09:04
@e-minguez e-minguez mentioned this pull request Sep 6, 2026
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