Repository navigation
Fix CI, upgrade Docusaurus and pnpm - #11
Merged
Merged
Conversation
- Pin pnpm 12 via packageManager so CI honors the lockfile; pnpm 8 silently ignored the v9 lockfile and resolved incompatible deps, which broke every deploy since July - Run prettier, typecheck and build on pull requests; deploy only from main in a separate job with scoped permissions - Pin Node 24 via .nvmrc and cache the pnpm store - Upgrade Docusaurus 3.4.0 -> 3.10.2, React 18 -> 19 and other deps, regenerating the lockfile - Add missing @types/node, @types/react and @docusaurus/theme-classic so typecheck passes - Move onBrokenMarkdownLinks to markdown.hooks and make it throw - Use the Rue logo as the social card instead of the missing template image - Remove the unused docusaurus deploy script and gh-pages settings
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.
Why
The site hasn't deployed since the July
fromkeyword commit (2428d9d). CI installed pnpm 8, which can't read the v9 lockfile. It printed "Ignoring broken lockfile" and resolved dependencies from scratch, which pulled in@types/react@19alongside Docusaurus 3.4 and broke the build (Cannot find module 'webpack/lib/ContextReplacementPlugin'). I reproduced this locally with pnpm 8.Changes
CI (
.github/workflows/deploy-pages.yml)packageManager(pnpm 12.18.0); install uses--frozen-lockfile.nvmrc(24), with the pnpm store cachedmain: prettier, typecheck, buildmainand is the only job withpages: write/id-token: write; the workflow default iscontents: readconfigure-pages(not needed for Docusaurus)Dependencies
caniuse-litewarning)@types/node,@types/react,@docusaurus/theme-classicsopnpm typecheckpasses (it was failing before)JSX.Element→ReactNode(React 19 types removed the globalJSXnamespace)pnpm-workspace.yamldenies thecore-jsinstall scripts (they only print a funding banner); without it, current pnpm stops with an error during installConfig
onBrokenMarkdownLinksmoved tomarkdown.hooks(deprecated location) and set tothrowimg/rue.png; the previousdocusaurus-social-card.jpgdidn't exist, so it was a 404deployscript andorganizationName/projectName(only used bydocusaurus deploy)README: required Node/pnpm versions, plus the check commands.
Testing
Locally with pnpm 12.18.0 / Node 24: clean
pnpm install --frozen-lockfilewith no warnings (a second run leaves the lockfile unchanged), thenpnpm prettier,pnpm typecheckandpnpm buildall pass. Checked the built homepage, all doc pages, and theog:imagemeta.Notes
github-pagesenvironment's deployment rules must still allowmain(they do now).