improvement(docs): build feature-branch docs previews only when docs change

Merged
WA
10d ago
+32-0

Summary

  • Add apps/docs/vercel.json with an Ignored Build Step (scripts/vercel-ignore-build.sh)
  • Production and staging build every affected commit, as today, so a shared-package change that breaks the docs build still fails on staging before it reaches main
  • Other preview branches build only when apps/docs changed since the branch's last successful deployment (VERCEL_GIT_PREVIOUS_SHA); "skip unaffected projects" already triggers docs previews on every @sim/db, @sim/emcn, @sim/utils or lockfile change, which is nearly every app PR
  • Anything the script can't decide builds: a branch's first deployment, or a previous SHA outside Vercel's shallow clone

Type of Change

  • Improvement

Testing

  • Ran the script against real commits for each path: production → build, staging → build, first deployment → build, unknown previous SHA → build, docs changed → build, no docs change → skip (exit 0 with a log line)
  • shellcheck and bash -n clean; biome check on vercel.json
  • Behavior follows Vercel's documented ignoreCommand contract (runs in the root directory before install; exit 0 skips, 1 builds)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)