Repository navigation
ci: fix the docs deploy under the pnpm workspace layout - #12917
Merged
Merged
Conversation
Since the repository root became a pnpm workspace that excludes `docs`, pnpm commands run from `docs` resolve to the root workspace: - the Cloudflare Pages build runs `pnpm install` in `docs`, which installs the root workspace instead of the docs dependencies, so `docusaurus` is missing when the build runs - `wrangler-action` runs from the repository root and falls back to `pnpm add wrangler@4` there, which pnpm rejects with `ERR_PNPM_ADDING_TO_ROOT` Give `docs` its own `pnpm-workspace.yaml` so it is a workspace root of its own, and run `wrangler-action` from `docs`.
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require review
Tip of the day💡 Did you know, you can route each severity your way: inline, summary, both, or drop |
Deploying typeorm with
|
| Latest commit: |
9ffba7c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b3a9e3bf.typeorm.pages.dev |
| Branch Preview URL: | https://fix-docs-deploy-pnpm-workspa.typeorm.pages.dev |
Cprakhar
approved these changes
Sep 30, 2026
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.
Description of change
Both docs deployments for
masterhave been failing since the repository root became a pnpm workspace (#12854). That workspace excludesdocs, but pnpm still walks up fromdocsto the rootpnpm-workspace.yaml:pnpm installindocs, which installs the root workspace ("Scope: all 5 workspace projects") and skips the docs dependencies. The build then fails withsh: 1: docusaurus: not found.Deploy Docs to Cloudflare Pagesworkflow:wrangler-actionruns from the repository root, can't findwrangler, and falls back topnpm add wrangler@4there. pnpm rejects that withERR_PNPM_ADDING_TO_ROOT.Changes:
docs/pnpm-workspace.yamlsodocsis a workspace root of its own. pnpm commands run fromdocsthen usedocs/pnpm-lock.yaml. The root workspace is unchanged.wrangler-actionwithworkingDirectory: docs, so it installs and runswranglerinside the docs project.Verified locally with pnpm 10.34.5 on a clean copy of the repository:
CI=true pnpm installindocsinstalls the root workspace andnpm run buildfails withdocusaurus: command not found, matching the Cloudflare log.docs/pnpm-lock.yamlwithout changing it and the site builds.pnpm install --frozen-lockfile --ignore-workspace, thenpnpm exec wrangler --version(not found), thenpnpm add wrangler@4(succeeds), thenpnpm exec wrangler --version(4.145.0).pnpm install --frozen-lockfilestill covers the same 5 workspace projects and the lockfile is up to date.Pull-Request Checklist
masterbranch