Fix broken Pages deploy and gate PRs with a build - #13
Merged
Merged
Conversation
pnpm-workspace.yaml had an allowBuilds key but no packages field. That is a pnpm 10+ shaped file, while both workflows pin pnpm 9, where a workspace file without packages is invalid - pnpm 9 fails on any command, including the "pnpm store path" that setup-node runs for cache: pnpm. Every Deploy run since 2026-08-14 failed in Setup Node.js before building anything, so the site has not published in weeks. Adding the packages field makes the file valid for pnpm 9 while keeping the esbuild allowance for newer pnpm. Verified locally: store path, install --frozen-lockfile and docs:build all pass under both pnpm 9.15.9 and 12.8.1, and the lockfile is unchanged. Also adds a CI workflow so PRs are built before merge instead of discovering breakage on main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things: the Pages deploy has been broken for weeks, and nothing builds PRs before merge.
The deploy has been failing since 2026-08-14
Every
Deploy to GitHub Pagesrun onmainhas failed — 6 in a row, each in 9–17 seconds, before building anything:Cause:
pnpm-workspace.yamlcontains anallowBuilds:key but nopackages:field. That shape is pnpm 10+, while both workflows pinpnpm/action-setup@v4atversion: 9. Under pnpm 9 a workspace file withoutpackages:is invalid, and every pnpm command fails — including thepnpm store paththatactions/setup-noderuns to set upcache: pnpm. So the job dies in Setup Node.js, before install or build.Reproduced locally: with pnpm 9.15.9 in this repo even
pnpm --versionfails with the same error. With pnpm 12.8.1 it passes, which is why it works on a dev machine with a newer pnpm.Fix: add the
packages:field, keeping the existing esbuild allowance for newer pnpm.Verified locally, both pnpm versions
pnpm store pathpnpm install --frozen-lockfilepnpm docs:buildpnpm-lock.yamlis untouched by the frozen install under either version.CI gate
deploy.ymlonly runs on push tomain, so a PR that breaks the site isn't caught until it has already merged. This addsci.yml, building every PR with the same toolchain as the deploy.Because VitePress fails the build on dead internal links, this also gates links to pages that don't exist. Confirmed by deliberately pointing a link at a missing page: the build exits 1.
Note
The alternative fix is bumping both workflows to pnpm 10+ instead. I went with the workspace file because it keeps the pinned toolchain unchanged and is verified against both versions — happy to switch if you'd rather move the pin forward.
🤖 Generated with Claude Code