Add PR CI to verify the site builds before merge#36
Merged
Conversation
Run pnpm install --frozen-lockfile and pnpm run build on pull requests targeting main (and in a merge queue), then assert the static export produced out/index.html. This gates merges on a publishable build so a branch that can't be built for GitHub Pages can't reach main. Mark the "Build (verify publishable export)" job as a required status check in branch protection to enforce it. Co-Authored-By: Claude Opus 4.8 <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.
What
Adds
.github/workflows/ci.yml: apull_request→mainworkflow that verifies the site builds into a publishable static export before merge.How it works
pnpm install --frozen-lockfile(also catchespackage.json/pnpm-lock.yamldrift) and runspnpm run build, on Node 24 with thepackageManager-pinned pnpm — mirroring the deploy workflow.out/index.htmlexists, so it confirms the static export was produced, not just that the command exited 0.nextjs.ymlon push tomain.The job "Build (verify publishable export)" is set as a required status check on
main, so branches that can't build for GitHub Pages can't merge.Verification
Reproduced the exact CI steps locally on Node 24:
--frozen-lockfilepasses, build is green (11/11 static pages),out/index.htmlproduced.🤖 Generated with Claude Code