Skip to content

ci: deploy docs via Workers Builds with pnpm workspace - #263

Open
dimitropoulos wants to merge 7 commits into
mainfrom
fix/docs-workers-builds
Open

ci: deploy docs via Workers Builds with pnpm workspace#263
dimitropoulos wants to merge 7 commits into
mainfrom
fix/docs-workers-builds

Conversation

@dimitropoulos

Copy link
Copy Markdown
Collaborator

Summary

  • Production docs deploy is Workers Builds (root /, pnpm --filter capnweb-docs build, pnpx --filter capnweb-docs wrangler deploy). Remove .github/workflows/deploy-docs.yml.
  • Switch the monorepo to pnpm so those filter commands work: pnpm-workspace.yaml includes the library, capnweb-validate, capnweb-docs, and the React example client.
  • Docs prebuild runs pnpm -w run build first so playgrounds get library/capnweb-validate dist under one install.
  • Update test / preview / release / pkg.pr.new workflows and docs install instructions accordingly.

Test plan

  • pnpm install
  • pnpm --filter capnweb-docs build
  • pnpm run build + node serialization tests
  • Workers Builds on this PR / after merge
  • GitHub build-docs and preview jobs

Production docs deploys through Cloudflare Workers Builds
(pnpm --filter capnweb-docs build / wrangler deploy from repo root),
so drop the redundant GitHub deploy-docs workflow.

Move the monorepo onto pnpm so that filter command works: include
packages/docs and the React example client in the workspace, replace
npm lockfiles with pnpm-lock.yaml, and point CI (test, preview,
release, pkg.pr.new) at pnpm. Docs prebuild builds the library first
so playgrounds resolve monorepo outputs under a single install.
Copilot AI lite review requested due to automatic review settings September 5, 2026 00:20
@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7e8a919

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ask-bonk

ask-bonk Bot commented Sep 5, 2026

Copy link
Copy Markdown

github run

@ask-bonk

ask-bonk Bot commented Sep 5, 2026

Copy link
Copy Markdown

@dimitropoulos Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/capnweb@263
npm i https://pkg.pr.new/cloudflare/capnweb/capnweb-validate@263

commit: 7e8a919

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-docs-workers-builds.pr.capnweb.com (commit 7e8a919)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c134e356.pr.capnweb.com 7e8a919 2026-09-05T01:44:16.756Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://da534b06.pr.capnweb.com 62d4a0b 2026-09-05T01:36:20.224Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d038f6ab.pr.capnweb.com 716bfd0 2026-09-05T01:33:38.980Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b6b33fb3.pr.capnweb.com 2b4d21b 2026-09-05T01:32:15.831Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://64a23408.pr.capnweb.com 75553bf 2026-09-05T01:28:55.566Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://34bc4cdf.pr.capnweb.com b06d208 2026-09-05T00:49:45.104Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://acb79184.pr.capnweb.com 81373c5 2026-09-05T00:21:49.809Z Visit the dashboard ↗

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are a few concrete doc/script issues to resolve (incorrect pnpx --filter usage, .npmrc guidance inconsistencies, and redundant double-build in dev:docs) before this can be safely approved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR migrates the repo’s tooling and CI from npm workspaces to a pnpm workspace so docs builds/deploys can run via Cloudflare Workers Builds using pnpm --filter commands.

Changes:

  • Introduces a pnpm-workspace.yaml + packageManager pin and updates root scripts to use pnpm filters/exec.
  • Updates CI workflows (test/preview/release/pkg.pr.new) to install/build with pnpm and removes the docs deploy GitHub Action.
  • Updates docs/readme guidance and docs package lifecycle scripts to build workspace outputs before bundling playgrounds.
File summaries
File Description
README.md Updates local docs dev instructions to pnpm-based commands.
pnpm-workspace.yaml Defines workspace packages for pnpm filtering across the monorepo.
packages/docs/README.md Updates docs site run/deploy instructions for pnpm + Workers Builds.
packages/docs/package.json Makes docs lifecycle hooks build workspace outputs before bundling playgrounds; adds wrangler/esbuild deps.
packages/docs/AGENTS.md Updates contributor guidance for pnpm workspace + Workers Builds/preview flow.
package.json Pins pnpm and rewires scripts to pnpm filters/exec; adds pnpm-only-built dependency config.
examples/worker-react/client/package-lock.json Removes npm lockfile as part of pnpm migration.
.npmrc Forces @cloudflare registry resolution to npmjs to avoid internal-registry overrides.
.github/workflows/test.yml Switches CI jobs to pnpm install/cache and pnpm-based build/test commands.
.github/workflows/release.yml Switches release pipeline to pnpm install/build/publish commands.
.github/workflows/preview-docs.yml Switches preview docs build/deploy steps to pnpm and workspace-scoped wrangler exec.
.github/workflows/pkg-pr-new.yml Switches pkg.pr.new publishing workflow to pnpm exec.
.github/workflows/deploy-docs.yml Removes GitHub Action-based production docs deploy in favor of Workers Builds.
Review details

Files not reviewed (1)

  • examples/worker-react/client/package-lock.json: Generated file

Suppressed comments (2)

packages/docs/AGENTS.md:33

  • This section says “Don’t commit an .npmrc” but the PR introduces a root .npmrc for exactly this use case, and it also uses pnpx --filter ... (which doesn’t work with pnpm workspace filtering / bypasses the pinned wrangler). Align the text and commands with the repo’s approach: root .npmrc + pnpm --filter capnweb-docs exec wrangler ....
Don't commit an `.npmrc` to work around it. Production deploys via Workers Builds
(`pnpm --filter capnweb-docs build` / `pnpx --filter capnweb-docs wrangler deploy`); PR previews
use `.github/workflows/preview-docs.yml`. `README.md`, "Deployment" and "Previews", is the detail.

packages/docs/README.md:944

  • The deployment command uses pnpx --filter ..., but pnpx doesn’t support pnpm workspace filtering and it also bypasses the pinned wrangler devDependency in this package. Use the same workspace-scoped pnpm --filter capnweb-docs exec wrangler ... form used elsewhere in this PR.
`pnpx --filter capnweb-docs wrangler deploy`. The same build runs as a `build-docs` job on every
  • Files reviewed: 12/16 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Outdated
Comment thread packages/docs/AGENTS.md Outdated
Comment thread packages/docs/README.md Outdated
Replace single-letter flags (-w, -r, -er, -X, -f, -g, -p) with their
long forms across docs scripts and CI workflows.
The repo already pins the scope to the public registry; drop the
manual override instructions that conflict with that.
@cloudflare cloudflare deleted a comment from github-actions Bot Sep 5, 2026
- Drop redundant library build from root dev:docs (predev already builds).
- Replace invalid pnpx --filter with pnpm --filter … exec wrangler.
- Remove preview-docs.yml; Workers Builds owns PR previews.
- Rewrite Previews docs for Workers Builds instead of the GH workflow.
Including packages/docs in the workspace pulled typescript@6 into
capnweb-validate (range allowed <7), which broke type-only asset
import detection. Pin validate to typescript@5.9.3.

Playwright resolved to 1.63 while the test job image is still
v1.56.1; pin playwright@1.56.1 to match.
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.

2 participants