Skip to content

fix: trigger Netlify docs builds on docs/ changes#746

Merged
fengmk2 merged 6 commits intomainfrom
fix-docs-deploy-v2
Mar 10, 2026
Merged

fix: trigger Netlify docs builds on docs/ changes#746
fengmk2 merged 6 commits intomainfrom
fix-docs-deploy-v2

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 10, 2026

Summary

  • Add ignore command to netlify.toml that watches docs/ for changes, fixing builds being skipped ("No changes detected in base directory")
  • Keep base = "rfcs/" to avoid Netlify's auto pnpm install failing on missing rolldown-vite patches
  • Handle empty $CACHED_COMMIT_REF (no previous successful build) by always proceeding

Context

Netlify's change detection watches the base directory. With base = "rfcs/", changes to docs/ were invisible, causing builds to be skipped. We can't use base = "docs/" because Netlify detects the root pnpm workspace and fails installing dependencies (missing rolldown-vite/patches/). The ignore command provides custom change detection that watches docs/ from the rfcs/ base.

Test plan

  • Push triggers Netlify build (ignore command exits 1 on docs/ changes)
  • Verify docs site deploys successfully

Netlify's change detection watches the `base` directory. Previously
`base` was set to `rfcs/`, so changes to `docs/` were invisible and
builds were skipped. Now the build runs directly from `docs/`.
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 10, 2026

Deploy Preview for viteplus-staging ready!

Name Link
🔨 Latest commit e4c9233
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69af6f3a61adc4000857d514
😎 Deploy Preview https://deploy-preview-746--viteplus-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 10, 2026
fengmk2 added 2 commits March 10, 2026 08:51
…lure

Netlify detects the root pnpm workspace and tries to install all
dependencies, which fails on a missing patch file. Skip this step
since the build command already runs `npm i --force` in docs/.
Keep base=rfcs/ to avoid pnpm workspace detection (rolldown-vite
patches don't exist on Netlify), but add an ignore command that
watches docs/ for changes instead of the base directory.
@fengmk2 fengmk2 force-pushed the fix-docs-deploy-v2 branch from e03d9ea to e835967 Compare March 10, 2026 00:57
fengmk2 added 2 commits March 10, 2026 09:01
When $CACHED_COMMIT_REF is empty (no previous successful build),
git diff compares HEAD against the working tree and finds no changes,
incorrectly skipping the build. Now we exit 1 (proceed) in that case.
@fengmk2 fengmk2 force-pushed the fix-docs-deploy-v2 branch 2 times, most recently from c20d2ff to 72e9e8c Compare March 10, 2026 01:07
@fengmk2 fengmk2 force-pushed the fix-docs-deploy-v2 branch from 72e9e8c to e4c9233 Compare March 10, 2026 01:09
@fengmk2 fengmk2 marked this pull request as ready for review March 10, 2026 01:10
@fengmk2 fengmk2 requested review from Brooooooklyn and cpojer March 10, 2026 01:10
@fengmk2 fengmk2 changed the title fix: set Netlify base to docs/ so deploys trigger on docs changes fix: trigger Netlify docs builds on docs/ changes Mar 10, 2026
@fengmk2 fengmk2 merged commit 265b8d0 into main Mar 10, 2026
22 checks passed
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

Merge activity

@fengmk2 fengmk2 deleted the fix-docs-deploy-v2 branch March 10, 2026 01:21
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.

2 participants