Skip to content

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

Merged
waleedlatif1 merged 1 commit into
stagingfrom
improvement/docs-preview-builds
Oct 24, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
improvement/docs-preview-builds

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

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)

…change

Production and staging keep building every affected commit, so a shared-package change that breaks the docs build still fails on staging before main. Other preview branches skip the build unless apps/docs changed since the branch's last successful deployment; a first deployment or a previous SHA outside the shallow clone builds.
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 24, 2026 6:52pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Adds a Vercel build gate for docs previews.

  • Feature-branch docs previews skip builds when docs stay unchanged.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Docs deployment] --> B{Production or staging?}
  B -->|Yes| C[Build]
  B -->|No| D{Previous commit available?}
  D -->|No| C
  D -->|Yes| E{Docs comparison}
  E -->|Changed or failed| C
  E -->|Unchanged| F[Skip preview build]
Loading

Reviews (1) · Last reviewed commit: "improvement(docs): build feature-branch ..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 4d33981 into staging Oct 24, 2026
42 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/docs-preview-builds branch October 24, 2026 19:04

This branch was successfully deployed

1 active deployment
Preview — eb20e520 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant