Repository navigation
ci(docs): build on Vercel only for docs changes and releases - #489
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "89abcdb0174e2d10c1ae49f3713e068c56deecc3",
"result": {
"overallSummary": "Reduces unnecessary Vercel docs builds by changing the `ignoreCommand` to only trigger a build when docs-related files (or workspace/lockfile dependencies that affect the docs build) change, or when the commit is a release commit made by `bumpp`.",
"groups": [
{
"key": "vercel-ignore-command",
"label": "Vercel ignoreCommand update",
"summary": "Updates the Vercel `ignoreCommand` so docs builds only trigger on changes under `docs/`, `pnpm-workspace.yaml`, or `pnpm-lock.yaml`, or on release commits (`chore: release v...`), instead of building on nearly every push.",
"category": "config",
"filePaths": [
"docs/vercel.json"
],
"critical": true,
"lineNotes": [
{
"path": "docs/vercel.json",
"side": "additions",
"line": 6,
"text": "Note the boundaries: this only checks the latest push's diff (`HEAD^ HEAD`), not the whole PR range, and relies on `HEAD^` existing in the shallow clone (exit 128 otherwise falls back to building)."
}
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-10T07:13:25.989Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
This branch was successfully deployed
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
The docs site on Vercel was rebuilt on almost every push. The old
ignoreCommand(git diff --quiet HEAD^ HEAD -- ':!content') skipped a build only when a commit changed nothing outsidedocs/content. Code-only commits likefix(hub-ui): ...still started a docs build.Now Vercel builds only when one of these is true:
docs/,pnpm-workspace.yamlorpnpm-lock.yaml. The docs usedevframeand plugins from the workspace and versions from the pnpm catalogs, so dependency changes can break the docs build.chore: release v, which is the commit thatbumppmakes. A release changes no file underdocs/, but the site should still deploy.All other commits skip the build.
Vercel runs
ignoreCommandindocs/before each build. Exit0skips the build. Any other exit code runs it.git diff --quietexits1when the listed paths changed. The:/pathspecs are resolved from the repo root. IfHEAD^is missing from the clone,git diffexits128and Vercel builds.Boundaries and risks
HEAD^..HEAD) is checked, not the whole PR. A push that changes only code skips the preview, even if earlier pushes changed docs.docs/or the pnpm filesUser prompts
Opus 5.5 in Claude Code (Paseo). The user asked: "make Vercel skip non-docs/release commits". My first version checked only commit messages. The user asked whether it should check the files instead. We picked a hybrid: changed files, plus the release commit message.
Verification
I ran the exact command from
docs/vercel.jsonwithshfromdocs/in a scratch git repo:pnpm exec eslint docs/vercel.jsonpasses. I did not test this on Vercel. The first deploy after merge shows if it works.Written by an AI agent (Claude). The user gave the task and picked the build rule. They have not reviewed the diff yet.