Skip to content

CI: Vercel runs a Preview deploy on every PR, even with no docs changes #463

Description

@BornPsych

Summary

The Vercel GitHub App (docs-provekit-org) creates a Preview deployment on every PR and push, regardless of whether anything under docs/ changed. For PRs that do not touch the docs site (the majority — most PRs are Rust/Go changes), this builds the docs site unnecessarily and adds a Vercel status check plus a sticky Vercel comment to the PR.

I investigated whether this could be controlled from the repo in #462 (now closed) — it cannot (see root cause).

Root cause

"Deploy on every PR" is controlled by the Vercel project Git settings, not the repo. Repo-side fixes do not work:

  • GitHub Actions paths: filters only gate GitHub Actions workflows — the Vercel GitHub App still receives every webhook.
  • A root .vercelignore cannot gate this; with the project Root Directory set to docs/, it either no-ops or breaks the docs build. (Confirmed in chore: gate Vercel deployments to docs-only changes #462.)

Requested fix (needs Vercel dashboard access)

Project → Settings → Git → Ignored Build Step → "Run my command":

git diff --quiet HEAD^ HEAD -- docs

Semantics: exit 0 (no docs/ change) → Vercel skips the build; exit 1 (docs/ changed) → Vercel builds. The path is relative to the repo root; if the project Root Directory is docs/, use . instead of docs.

Alternative

If per-PR docs previews are not needed, disable Preview Deployments for non-production branches under the same Git settings, keeping only main → Production.

Expected outcome

  • PRs that do not touch docs/: no Vercel build, status check, or comment.
  • PRs that touch docs/, and main: deploy as today.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions