Skip to content

Fix CI, upgrade Docusaurus and pnpm - #11

Merged
Rigidity merged 1 commit into
mainfrom
rigidity/fix-ci-and-deps
Nov 9, 2026
Merged

Rigidity merged 1 commit into
mainfrom
rigidity/fix-ci-and-deps

Conversation

@Rigidity

@Rigidity Rigidity commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Why

The site hasn't deployed since the July from keyword 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@19 alongside 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)

  • pnpm version comes from packageManager (pnpm 12.18.0); install uses --frozen-lockfile
  • Node pinned via .nvmrc (24), with the pnpm store cached
  • Runs on pull requests as well as main: prettier, typecheck, build
  • Deploy is a separate job that only runs on main and is the only job with pages: write/id-token: write; the workflow default is contents: read
  • Actions bumped to current majors; dropped configure-pages (not needed for Docusaurus)

Dependencies

  • Docusaurus 3.4.0 → 3.10.2, React 18 → 19, TypeScript 5.2 → 5.9, prettier, prismjs, etc.; lockfile regenerated (also clears the outdated caniuse-lite warning)
  • Added @types/node, @types/react, @docusaurus/theme-classic so pnpm typecheck passes (it was failing before)
  • JSX.Element → ReactNode (React 19 types removed the global JSX namespace)
  • pnpm-workspace.yaml denies the core-js install scripts (they only print a funding banner); without it, current pnpm stops with an error during install

Config

  • onBrokenMarkdownLinks moved to markdown.hooks (deprecated location) and set to throw
  • Social card now uses img/rue.png; the previous docusaurus-social-card.jpg didn't exist, so it was a 404
  • Removed the unused deploy script and organizationName/projectName (only used by docusaurus deploy)

README: required Node/pnpm versions, plus the check commands.

Testing

Locally with pnpm 12.18.0 / Node 24: clean pnpm install --frozen-lockfile with no warnings (a second run leaves the lockfile unchanged), then pnpm prettier, pnpm typecheck and pnpm build all pass. Checked the built homepage, all doc pages, and the og:image meta.

Notes

  • The social card is the square 370×370 logo. A proper 1200×630 card would look better in link previews; that can be a follow-up.
  • After merge, the github-pages environment's deployment rules must still allow main (they do now).

- 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
@Rigidity
Rigidity merged commit 85998e3 into main Nov 9, 2026
2 checks passed
@Rigidity
Rigidity deleted the rigidity/fix-ci-and-deps branch November 9, 2026 02:30
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