ci/vercel: Skip preview builds for PRs that only touch non-site files - #1901
Open
marcleblanc2 wants to merge 2 commits into
Open
ci/vercel: Skip preview builds for PRs that only touch non-site files#1901marcleblanc2 wants to merge 2 commits into
marcleblanc2 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a vercel.json ignoreCommand so Vercel skips the build when every changed file is outside what the site builds from: .github, .agents, .amp, .vscode, AGENTS.md, README.md, .gitignore, cspell*. Anything else (docs, src, public, dev, root configs, lockfile) still builds. Amp-Thread-ID: https://ampcode.com/threads/T-01a08e2d-682f-75dd-a050-cb9bf8888dac Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
force-pushed
the
ci/vercel-ignore-non-site-changes
branch
from
September 11, 2026 02:10
f269dd7 to
49f5dde
Compare
marcleblanc2
enabled auto-merge (squash)
September 11, 2026 02:10
Amp-Thread-ID: https://ampcode.com/threads/T-01a08e2d-682f-75dd-a050-cb9bf8888dac Co-authored-by: Amp <amp@ampcode.com>
jac
approved these changes
Sep 11, 2026
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.
Why
PRs that only change CI workflows, agent config, or repo docs (
.github/,AGENTS.md, cspell lists, ...) currently trigger a full Vercel build and preview deploy that has nothing to preview.What
Adds
vercel.jsonwith anignoreCommand. Vercel runs it before each build: exit 0 skips, exit 1 builds.The command diffs
HEAD^..HEADwith these paths excluded:.github,.agents,.amp,.vscode,AGENTS.md,README.md,.gitignore,cspell*,dev/TODO.md. If nothing else changed, the build is skipped. Everything the site builds from (docs/,src/,public/,dev/, root configs, lockfile) still builds.dev/stays build-relevant becausenext.config.jsruns thedev/check-*.mjsscripts duringnext build.Verification
main: all touched site files and all correctly returned BUILD (including c89ef41, which was mostly.github/cspell/README but also touchedsrc/data/redirects.ts)..gitignore,cspell-allow-list.txt,.github/x/y.yml: exit 0 (SKIP).docs/: exit 1 (BUILD).Caveats
--depth=10and this compares only the last commit. A push of several commits where only the last is non-site-only would be skipped. Squash merges tomainare one commit, so production is unaffected.mainruleset has no required status checks, so this does not block merging.vercel.json, which is not in the exclude list, so Vercel should still build it.