Repository navigation
ci: deploy docs to cloudflare pages instead of github pages - #34
Merged
Merged
Conversation
GitHub Pages offers no traffic analytics and no per-PR preview of the rendered site. The docs move to Cloudflare Pages, which provides both. deploy.yml keeps building with pnpm and turbo, exactly as before, and hands the artifact to wrangler instead of upload-pages-artifact. Building in Actions rather than through Cloudflare's git integration keeps the deploy definition in the repository where it can be reviewed in a pull request, and avoids configuring pnpm workspace builds in a dashboard. test-deploy.yml now publishes a preview deployment per pull request rather than only checking that the site compiles. A build passing is not evidence that the page renders correctly: prettier recently collapsed the fenced code blocks in installation.mdx onto one line and the build stayed green, because MDX does not error on that. The site moves to nodecord.pages.dev, which drops the /nodecord/ baseUrl. GitHub Pages keeps serving a small redirect site, added under .github/pages-redirect, because the readmes published to npm in 0.2.0 link to datzu712.github.io/nodecord and those tarballs cannot be edited. Deep links are preserved through 404.html, which GitHub Pages serves for every unmatched path. Requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets, and a Cloudflare Pages project named nodecord.
The deploy failed at the "Installing Wrangler" step with pnpm exiting 1. wrangler-action picks a package manager by looking for a lock file, so it chose pnpm. wrangler depends on workerd, which has a postinstall script, and pnpm 11 refuses to run build scripts that are not approved under allowBuilds in pnpm-workspace.yaml, exiting 1 with ERR_PNPM_IGNORED_BUILDS. Reproduced in a scratch workspace: pnpm add wrangler exits 1, npm install wrangler exits 0. Adding workerd to allowBuilds would approve build scripts for a package that is not a dependency of this project, so the package manager used to install the action's own tooling is pinned to npm instead. The action also moves to v4, which runs on node24 and clears the Node 20 deprecation warning on the runner. deployment-url, which the preview job reports, still exists in v4.
Replaces the previous packageManager: npm workaround. wrangler-action resolves a pre-installed wrangler before falling back to installing one. When wranglerVersion is left unset and the binary is already resolvable, the action reports "using pre-installed wrangler version" and skips installation entirely, so the deployed version is the one pinned in pnpm-lock.yaml rather than whatever is latest at run time. wrangler is added to the workspace root devDependencies, and workerd, its transitive dependency with a postinstall script, is approved under allowBuilds. Without that approval pnpm 11 exits 1 with ERR_PNPM_IGNORED_BUILDS, which is what broke the deploy in the first place. Verified: pnpm install --frozen-lockfile exits 0 with no ignored builds, pnpm exec wrangler --version (the command the action runs to detect an existing install) reports 4.114.0, and build and tests still pass.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
nodecord | f697b77 | Jul 27 2026, 07:24 PM |
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.
GitHub Pages offers no traffic analytics and no per-PR preview of the rendered site. The docs move to Cloudflare Pages, which provides both.
The site moves to nodecord.pages.dev, which drops the /nodecord/ baseUrl. GitHub Pages keeps serving a small redirect site, added under .github/pages-redirect, because the readmes published to npm in 0.2.0 link to datzu712.github.io/nodecord and those tarballs cannot be edited. Deep links are preserved through 404.html, which GitHub Pages serves for every unmatched path.
TODO: This PR requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets.