Repository navigation
ci(website): Skip Renovate docs-site previews for manifest-only changes - #4158
Conversation
Renovate pushes were starting a docs-site preview whenever website/package.json changed. The install command then exited 2 because yarn prepare runs tsc, and react-native 0.87 removed InteractionManager while packages/react still imports it. Skip renovate/* previews whose only site changes are non-major website dependency bumps. Also skip previews that would die in that prepare failure, unless site or docs source changed. Production deploys are unchanged. Co-authored-by: Nathaniel Tucker <me@ntucker.me>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
ntucker
left a comment
There was a problem hiding this comment.
Staff engineer (Cursor agent): LGTM.
Fails open, keeps production building, and only skips previews that cannot show a site change (Renovate non-major website manifests, or install dying in yarn prepare on the known RN 0.87 / InteractionManager break). Real site or docs diffs still build. The decide script is zero-dep for Vercel ignore, and the fixture suite covers the merge and major-vs-non-major cases that matter.
FOLLOW_UP after merge (not this PR): once packages/react drops the InteractionManager imports, delete the prepare-failure path in vercel-ignore-decide.js / vercel-ignore.sh and the matching fixtures so that special case does not linger.
Drop the node decision helper, version-range parsing, and the InteractionManager / yarn prepare special case. Renovate previews now skip by excluding website package.json and lockfiles from SITE_PATHS. site-preview.yml returns to master's version. Co-authored-by: Nathaniel Tucker <me@ntucker.me>
ntucker
left a comment
There was a problem hiding this comment.
Staff engineer (Cursor agent): LGTM.
Simpler tip than the earlier decide/prepare-failure path: on renovate/* only, pathspec-exclude website manifests and lockfiles from SITE_PATHS, then reuse the existing preview decide. Production still fails open before that block. Real site or docs source still builds; non-Renovate website bumps still build; merge-of-master fixture covers the shallow-diff trap. site-preview.yml staying on GHA for Renovate is the right credit tradeoff.
No CHANGE_THIS_PR. The prior FOLLOW_UP about deleting prepare-failure is moot — that path is gone.
Motivation
Vercel spends a docs-site preview build, and emails "Preview deployment failed for docs-site", on nearly every push to
renovate/all-minor-patch(#4059). Those pushes only touchwebsite/package.json, whichwebsite/scripts/vercel-ignore.shcounts as a site change. A dependency bump alone does not change the published site.Solution
A short-circuit in the existing ignore script, which
website/vercel.jsonalready runs asignoreCommand. Onrenovate/*previews, the script now adds pathspec excludes toSITE_PATHSfor websitepackage.json,yarn.lock,package-lock.json,pnpm-lock.yaml, andnpm-shrinkwrap.json, including nested ones (website/**/). If nothing else in the site changed, the preview is skipped.master,rest-hooks-site,VERCEL_ENV=production) is unchanged.site-preview.ymlis unchanged. It still typechecks and runsvercel buildon GitHub runners for Renovate PRs, which costs no Vercel build credits.vercel-ignore.test.shgains cases for each of these, including a Renovate branch that merges master.Open questions
None.