Repository navigation
ci(docs): install the website deps with bun, not npm ci - #2156
Merged
Merged
Conversation
`validate-docs` fails on every PR that touches `docs/**`:
npm error The `npm ci` command can only install with an existing
package-lock.json or npm-shrinkwrap.json
The job sparse-checks-out `package.json` and `package-lock.json` from
rustledger.github.io and runs `npm ci` against them. That repo moved to bun
and deleted its lockfile in rustledger.github.io#30, so the sparse checkout
now pulls a path that does not exist and `npm ci` has nothing to install
from.
Nothing here changed. The workflow only runs on `docs/**`, and no PR had
touched docs since that deletion, so the breakage sat unnoticed until the
next docs change picked it up.
Fetches `bun.lock` instead, and installs with `bun install
--frozen-lockfile`, matching how rustledger.github.io's own deploy workflow
builds the same site. `--frozen-lockfile` keeps the "the lockfile is the
source of truth" property `npm ci` was there for. VitePress runs under
`bunx`.
Drops `.nvmrc` from the rustledger sparse checkout: it existed only to feed
`setup-node`'s `node-version-file`, and there is no `setup-node` step now.
Not a required check, so this was not blocking merges -- it was just going to
be red on every docs PR from here on.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
The previous commit fixes a broken docs build, and could not run the docs build to prove it: the job only triggers on `docs/**`, so a PR that touches only the workflow gets 41 checks and not this one. A CI fix that its own CI cannot exercise merges on reasoning alone. Adding the workflow file to both paths lists makes this PR run the job it changes, and means the next edit here is exercised rather than assumed. Same shape as the gap that caused the breakage in the first place. That one went unnoticed because the trigger was narrow enough that months of commits never touched it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the validate-docs GitHub Actions workflow so it can install and build the VitePress website after rustledger.github.io migrated from npm (package-lock.json + npm ci) to Bun (bun.lock + bun install).
Changes:
- Updates the website sparse checkout to fetch
bun.lockinstead ofpackage-lock.json. - Replaces Node/npm setup and install with
oven-sh/setup-bunandbun install --frozen-lockfile. - Builds VitePress via
bunx vitepress build docsand removes the no-longer-needed.nvmrcsparse checkout.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
`bun-version: latest` leaves the docs build tracking whatever upstream shipped most recently, so a bun release can turn an unrelated PR red with no change on either side. That is the failure this workflow is being repaired from in the first place, one layer up. It is also precisely what happened to pta-standards recently: an unpinned `ruff` reformatted 41 files the day it changed style, and the PR that inherited the red build had touched one markdown file. Pinned to 1.4.0, the current release. Nothing bumps it automatically -- dependabot maintains the action SHA, not this input -- so the comment says to raise it deliberately. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validate-docsis red on every PR that touchesdocs/**:Cause
The job sparse-checks-out
package.jsonandpackage-lock.jsonfromrustledger.github.io, then runsnpm ciagainst them. That repo moved to bun and deleted its lockfile in rustledger.github.io#30 (9047afee2, 2026-08-24), so the sparse checkout now requests a path that no longer exists andnpm cihas nothing to install from.Nothing in this repo changed.
docs-validate.ymlonly triggers ondocs/**, and no PR had touched docs since that deletion, so it stayed green-by-absence until the next docs change picked it up. Its last real runs, on 2026-08-24, predate the lockfile removal.Fix
Fetch
bun.lockand install withbun install --frozen-lockfile, matching howrustledger.github.io's owndeploy.ymlbuilds the same site.--frozen-lockfilepreserves the "lockfile is the source of truth" property thatnpm ciwas there for, rather than dropping to a resolving install. VitePress runs underbunx.Also drops
.nvmrcfrom the rustledger sparse checkout. It existed only to feedsetup-node'snode-version-file, and there is nosetup-nodestep any more.oven-sh/setup-bunis pinned by SHA (0c5077e5= v2.2.0), matching the pinning convention of the other actions in this file.Scope
Not a required check (
buildandPython-gated cargo testsare the only two), so this was never blocking merges. It was simply going to be red on every docs PR from here on, which is the state that teaches people to ignore a red X.Found while reviewing #2155, whose docs commit is the change that surfaced it.
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr