Skip to content

chore: support docs only builds#16312

Open
sarahxsanders wants to merge 2 commits intomasterfrom
docs-only-builds
Open

chore: support docs only builds#16312
sarahxsanders wants to merge 2 commits intomasterfrom
docs-only-builds

Conversation

@sarahxsanders
Copy link
Copy Markdown
Contributor

Changes

I am proposing to add a GATSBY_DOCS_ONLY build mode to speed up preview deploys for docs PRs

the problem: every PR builds the entire site, even with GATSBY_MINIMAL=true. for PRs that only touch docs, slow builds are one contributing factor to stale agent-generated docs PRs not getting merged (one factor among many that I am addressing this quarter!)

this change:

  • CI workflow changes to detect whether a PR only touches docs by looking for PRs with changes to ONLY contents/docs AND src/navs/index.js for sidebar nav, vercel.json for redirects

please opine if you feel strongly about any of these files being included, i'm on the fence about vercel.json because our Inkeep agent isn't allowed to touch that

  • doesn't affect PRs that touch more than docs

Testing

i tested locally:

  • cold docs only build: 376s
  • docs-only build w/ cache: 164s
  • previous minimal build: 15 min

CI should improve further over the local numbers

to test locally:

NODE_OPTIONS='--max_old_space_size=8192' GATSBY_DOCS_ONLY=true pnpm build

@sarahxsanders sarahxsanders requested review from a team April 10, 2026 18:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Apr 10, 2026 07:17PM

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