Skip to content

ci: add docs build check to catch dead links in PRs#9052

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs
Apr 10, 2026
Merged

ci: add docs build check to catch dead links in PRs#9052
graphite-app[bot] merged 1 commit intomainfrom
04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs

Conversation

@hyf0
Copy link
Copy Markdown
Member

@hyf0 hyf0 commented Apr 10, 2026

Summary

  • Add a docs-build job to CI that runs the full docs pipeline (TypeDoc reference generation + VitePress build) to catch dead links and build errors before merge
  • Add docs-changes path filter that triggers on changes to docs/, packages/rolldown/src/** (JSDoc comments feed TypeDoc), packages/pluginutils/**, and pnpm-lock.yaml
  • Only runs when relevant files change (or on main), matching the existing CI pattern

Context

The Netlify deploy preview for #9050 caught a dead link (/guide/manual-code-splitting/in-depth/manual-code-splitting) that was only discovered after push. VitePress already has built-in dead link detection that fails the build, but this only ran on Netlify — not in the required CI checks. This adds it as a proper CI gate.

Fixed in #9051.

🤖 Generated with Claude Code

Copy link
Copy Markdown
Member Author

hyf0 commented Apr 10, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 10, 2026

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 2a667df
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69d885f0cd415900080c5328

@hyf0 hyf0 force-pushed the 04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs branch 5 times, most recently from 55da6c9 to a5973ef Compare April 10, 2026 02:53
@hyf0 hyf0 requested review from sapphi-red and shulaoda April 10, 2026 03:04
@hyf0 hyf0 marked this pull request as ready for review April 10, 2026 03:04
Copilot AI review requested due to automatic review settings April 10, 2026 03:04
Copy link
Copy Markdown
Member Author

hyf0 commented Apr 10, 2026

Merge activity

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a dedicated CI gate to build the documentation (TypeDoc reference generation + VitePress build) so dead links and docs build failures are caught before merge, aligned with the existing “run only when relevant files change (or on main)” pattern.

Changes:

  • Add a docs-validation job that runs vp run docs:build (and builds @rolldown/pluginutils first).
  • Add a docs-changes paths-filter and expose it as a changes job output to conditionally run the docs job.
  • Surface the docs change-detection result in the “Show outputs” step.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@hyf0 hyf0 force-pushed the 04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs branch from a5973ef to 1bccdf4 Compare April 10, 2026 03:09
@sapphi-red
Copy link
Copy Markdown
Member

Why doesn't the netlify preview build catch these?

@hyf0
Copy link
Copy Markdown
Member Author

hyf0 commented Apr 10, 2026

Why doesn't the netlify preview build catch these?

Not sure. From previous experience it doesn't. I consider this as a minimum effort to prevent future regressions.

Copy link
Copy Markdown
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

I think it'd be ideal to catch this on the netlify build as this will occupy another CI machine for each PR. But I also think it's fine to merge this for now

## Summary

- Add a `docs-build` job to CI that runs the full docs pipeline (TypeDoc reference generation + VitePress build) to catch dead links and build errors before merge
- Add `docs-changes` path filter that triggers on changes to `docs/`, `packages/rolldown/src/**` (JSDoc comments feed TypeDoc), `packages/pluginutils/**`, and `pnpm-lock.yaml`
- Only runs when relevant files change (or on `main`), matching the existing CI pattern

## Context

The Netlify deploy preview for #9050 caught a dead link (`/guide/manual-code-splitting` → `/in-depth/manual-code-splitting`) that was only discovered after push. VitePress already has built-in dead link detection that fails the build, but this only ran on Netlify — not in the required CI checks. This adds it as a proper CI gate.

Fixed in #9051.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app Bot force-pushed the 04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs branch from 1bccdf4 to 2a667df Compare April 10, 2026 05:09
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedutil-deprecate@​1.0.21001008375100
Addedsource-map-js@​1.2.19910010080100
Addedpathe@​2.0.31001009282100
Addedvite@​8.0.5941008299100
Addedsource-map@​0.7.610010010087100
Addedrollup@​4.60.18810010098100
Addedtypescript@​6.0.2100100909990
Addedpicomatch@​4.0.410010010092100

View full report

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: packages/rolldown/tests/package.jsonnpm/vite@8.0.5

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@8.0.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@hyf0
Copy link
Copy Markdown
Member Author

hyf0 commented Apr 10, 2026

The Netlify preview does catch dead links (VitePress build fails on them by default). However, I don't think we can make it a required GitHub status check — when the ignore script in docs/netlify.toml skips the build (because no docs files changed), Netlify doesn't post a status check at all. A required check would hang as "pending" forever on non-docs PRs.

The CI job avoids this because GitHub Actions reports the job as "skipped" when path filters don't match, which satisfies required status checks.

Also, the Netlify build is controlled on Netlify's side — they could change their build behavior without us noticing, so having our own CI check is more reliable.

That said, I haven't verified this myself — it felt too cumbersome to test. If anyone knows differently, happy to revisit.

This reply was generated with the help of Claude Code.

@graphite-app graphite-app Bot merged commit 2a667df into main Apr 10, 2026
33 checks passed
@graphite-app graphite-app Bot deleted the 04-10-ci_add_docs_build_check_to_catch_dead_links_in_prs branch April 10, 2026 05:14
@github-actions github-actions Bot mentioned this pull request Apr 15, 2026
@github-actions github-actions Bot mentioned this pull request Apr 16, 2026
shulaoda added a commit that referenced this pull request Apr 16, 2026
## [1.0.0-rc.16] - 2026-04-16

### 🚀 Features

- const enum cross-module inlining support (#8796) by @Dunqing
- implement module tagging system for code splitting (#9045) by @hyf0

### 🐛 Bug Fixes

- rolldown_plugin_vite_manifest: handle duplicate chunk names for CSS entries (#9059) by @sapphi-red
- improve error message for invalid return values in function options (#9125) by @shulaoda
- await async export-star init wrappers (#9101) by @thezzisu
- never panic during diagnostic emission (#9091) by @IWANABETHATGUY
- include array rest pattern in binding_identifiers (#9112) by @IWANABETHATGUY
- rolldown: set worker thread count with ROLLDOWN_WORKER_THREADS (#9086) by @fpotter
- rolldown_plugin_lazy_compilation: escape request ID in proxy modules (#9102) by @h-a-n-a
- treat namespace member access as side-effect-free (#9099) by @IWANABETHATGUY
- relax overly conservative side-effect leak check in chunk optimizer (#9085) by @IWANABETHATGUY
- runtime: release `cb` reference after `__commonJS` factory initialization (#9067) by @hyf0-agent
- `@__NO_SIDE_EFFECTS__` wrapper should not remove dynamic imports (#9075) by @IWANABETHATGUY
- rolldown_plugin_vite_import_glob: use POSIX path join/normalize for glob resolution (#9077) by @shulaoda
- emit REQUIRE_TLA error when require() loads a module with top-level await (#9071) by @jaehafe
- emit namespace declaration for empty modules in manual chunks (#8993) by @privatenumber
- rolldown_plugin_vite_import_glob: keep common base on path segment boundary (#9070) by @shulaoda
- prevent circular runtime helper imports during facade elimination (#8989) (#9057) by @IWANABETHATGUY
- correct circular dependency check in facade elimination (#9047) by @h-a-n-a
- docs: correct dead link in CodeSplittingGroup.tags JSDoc (#9051) by @hyf0
- emit DUPLICATE_SHEBANG warning when banner contains shebang (#9026) by @IWANABETHATGUY

### 🚜 Refactor

- use semantic reference flags for member write detection (#9060) by @Dunqing
- extract UsedSymbolRefs newtype wrapper (#9130) by @IWANABETHATGUY
- dedupe await wrapping in export-star init emit (#9119) by @IWANABETHATGUY
- calculate side-effect-free function symbols on demand (#9120) by @IWANABETHATGUY
- extract duplicated top-level await handling into shared helper (#9087) by @IWANABETHATGUY
- rolldown_plugin_vite_import_glob: use split_first for get_common_base (#9069) by @shulaoda
- simplify ESM init deduplication with idiomatic insert check (#9044) by @IWANABETHATGUY

### 📚 Documentation

- document runtime module placement strategy in code-splitting design (#9062) by @IWANABETHATGUY
- clarify `options` hook behavior difference with Rollup in watch mode (#9053) by @sapphi-red
- meta/design: introduce module tags (#9017) by @hyf0

### ⚡ Performance

- convert `generate_transitive_esm_init` to iterative (#9046) by @IWANABETHATGUY

### 🧪 Testing

- merge strict/non_strict test variants using configVariants (#9089) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- disable Renovate auto-updates for oxc packages (#9129) by @IWANABETHATGUY
- upgrade oxc@0.126.0 (#9127) by @Dunqing
- deps: update napi to v3.8.5 (#9126) by @renovate[bot]
- deps: update dependency @napi-rs/cli to v3.6.2 (#9123) by @renovate[bot]
- move lazy-compilation design doc (#9117) by @h-a-n-a
- deps: update dependency vite-plus to v0.1.18 (#9118) by @renovate[bot]
- deps: update dependency vite-plus to v0.1.17 (#9113) by @renovate[bot]
- deps: update oxc to v0.125.0 (#9094) by @renovate[bot]
- deps: update dependency follow-redirects to v1.16.0 [security] (#9103) by @renovate[bot]
- deps: update test262 submodule for tests (#9097) by @sapphi-red
- deps: update crate-ci/typos action to v1.45.1 (#9096) by @renovate[bot]
- deps: update rust crates (#9081) by @renovate[bot]
- deps: update npm packages (#9080) by @renovate[bot]
- remove outdated TODO in determine_module_exports_kind (#9072) by @jaehafe
- rust/test: support `extendedTests: false` shorthand in test config (#9050) by @hyf0
- ci: extract shared infra-changes anchor in path filters (#9054) by @hyf0
- add docs build check to catch dead links in PRs (#9052) by @hyf0

### ❤️ New Contributors

* @thezzisu made their first contribution in [#9101](#9101)
* @fpotter made their first contribution in [#9086](#9086)
* @jaehafe made their first contribution in [#9071](#9071)
* @privatenumber made their first contribution in [#8993](#8993)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

3 participants