ci: add production build check and lighten pre-commit hooks#988
Merged
Yeom-JinHo merged 1 commit intoJul 19, 2026
Merged
Conversation
Add a build job to code-check.yml so PRs that break the Next.js production build fail CI. The job needs no secrets (all env reads are defensive), caches apps/www/.next/cache, and uses setup-node@v4 with node-version-file so the Node version follows .nvmrc. A workflow-level concurrency group cancels superseded runs on rapid PR pushes. Rework lefthook.yml around fast, staged-only pre-commit: - lint/format run directly on staged files instead of the whole project - registry build uses the www-scoped script (the root script also ran a full-project lint:fix + format:fix) and stages generated artifacts by explicit path instead of `git add --all` - full typecheck moves from pre-commit to pre-push; CI remains the backstop for everything removed locally Ignore generated registry JSON in prettier so the format hook can never reformat build:registry output away from its JSON.stringify form, which would trip CI's registry-drift check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEkEs1cWYWSvshxhxJZ6od
|
@Yeom-JinHo is attempting to deploy a commit to the product-studio Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
buildjob tocode-check.yml— PRs that break the Next.js production build now fail CI. No secrets needed (all env reads in the build path are defensive), so fork PRs build identically. Cachesapps/www/.next/cache, usessetup-node@v4+node-version-file: .nvmrc. A workflow-levelconcurrencygroup cancels superseded runs on rapid pushes.lefthook.ymlaround fast, staged-only pre-commit (~30–120s → ~2–10s per commit):git add --all.prettierignoreso the format hook can never reformatbuild:registryoutput away from itsJSON.stringifyform (which would trip the registry-drift CI check).Why the build job matters
While validating this change on a fork that predated #979, the new job immediately caught the tweet-card prerender regression (
TypeError: c is not iterable) that used to slip through CI — exactly the class of failure this check gates. Verified green against currentmain(full 381-page prerender, ~5 min cold / ~2–4 min with warm cache).Contributor-facing changes
git commit— they blockgit pushand CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01QEkEs1cWYWSvshxhxJZ6od