Skip to content

ci(docs): build docs.qauth.dev on Netlify's own CD, and pin pnpm for it - #395

Merged
EsTharian merged 1 commit into
mainfrom
fix/netlify-git-cd
Aug 26, 2026
Merged

ci(docs): build docs.qauth.dev on Netlify's own CD, and pin pnpm for it#395
EsTharian merged 1 commit into
mainfrom
fix/netlify-git-cd

Conversation

@EsTharian

Copy link
Copy Markdown
Member

Netlify now builds and deploys the site from main directly, so the GitHub Actions deploy is redundant. This removes it and replaces it with a netlify.toml, which also fixes the two things that made the first Netlify build fail.

The failure

Installing npm packages using pnpm version 10.30.3
ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)
Expected version: >=11.0.0
Got: 10.30.3
Failing build: Failed to install dependencies

The root package.json declares engines.pnpm: ">=11.0.0", but the exact version is pinned only inside each workflow's pnpm/action-setup input — so an external builder has nothing to read it from and Netlify activated its own bundled pnpm. PNPM_VERSION = "11.4.0" is now stated where Netlify looks, matching what .github/workflows/*.yml install.

Deliberately not a packageManager field. Every workflow passes an explicit version: to pnpm/action-setup, so a second declaration would be something to reconcile rather than a pin. Consolidating on packageManager and dropping those three inputs is a reasonable follow-up; it is a larger change than this build needs.

A second failure was queued behind it

The site was configured to publish apps/docs-site/dist. That directory is emptyastro.config.mjs redirects outDir to the workspace-level dist/apps/docs-site so it matches the Nx build target's declared outputs (a declared output that does not match reality breaks Nx caching silently). Once the install was fixed, the deploy would have published nothing and reported success.

Verified by running the configured command against a clean output directory: pnpm exec nx build docs-site lands 120 files in dist/apps/docs-site.

Since netlify.toml overrides the equivalent Netlify UI fields, no dashboard change is required — though the stale publish path is still set there and is worth correcting.

What is removed, and what is not

.github/workflows/docs.yml built the site in Actions and uploaded the prebuilt output through the Netlify CLI, which needed a NETLIFY_AUTH_TOKEN and a NETLIFY_SITE_ID that were never set. It had been failing on every push to main and every pull request.

Its nx test docs-site / nx build docs-site steps are not a loss: ci.yml runs nx affected -t lint typecheck test build, which covers docs-site — its four drift invariants included — whenever the diff touches the project or anything it reads.

Also

apps/docs-site/README.md's deployment section is rewritten to describe Netlify's CD rather than the deleted workflow, and to record why PNPM_VERSION and publish are load-bearing, so the next person to hit either does not have to re-derive it from a build log.

Verification

  • nx run-many -t lint typecheck test build across all 26 projects — clean
  • nx build docs-site into a cleared dist/apps/docs-site — 120 files, confirming the publish path

🤖 Generated with Claude Code

https://claude.ai/code/session_01TKAC2F5PayPstKTrF2NLp9


Generated by Claude Code

Netlify now builds and deploys the site from `main` directly, so the
GitHub Actions deploy is redundant and is removed. `.github/workflows/docs.yml`
built the site in Actions and pushed the prebuilt output through the
Netlify CLI, which needed a `NETLIFY_AUTH_TOKEN` and a `NETLIFY_SITE_ID`
that were never set — so it had been failing on every push and every PR.
The site's checks do not go with it: `ci.yml` runs `nx affected -t lint
typecheck test build`, which covers `docs-site` and its drift invariants
whenever the diff touches them.

`netlify.toml` replaces it, and fixes two things that made the first
Netlify build fail:

**pnpm.** The root `package.json` declares `engines.pnpm: ">=11.0.0"` but
pins the exact version only inside each workflow's `pnpm/action-setup`
input, so an external builder has nothing to read it from. Netlify
activated its bundled pnpm 10.30.3 and the install died with
`ERR_PNPM_UNSUPPORTED_ENGINE` before a file was built. `PNPM_VERSION` is
now stated where Netlify reads it, at the same 11.4.0 the workflows
install. Deliberately not a `packageManager` field: every workflow passes
an explicit `version` to `pnpm/action-setup`, and a second declaration
would be a conflict to resolve rather than a pin.

**The publish path.** The site was configured to publish
`apps/docs-site/dist`, which is empty — `astro.config.mjs` redirects
`outDir` to the workspace-level `dist/apps/docs-site` so it matches the Nx
target's declared `outputs`. That mismatch would have deployed nothing and
reported success once the install was fixed. Verified by running the
configured command: `pnpm exec nx build docs-site` lands 120 files there.

`netlify.toml` overrides the equivalent Netlify UI fields, so the build is
reproducible from the repository rather than from dashboard settings
nobody can review. The docs-site README's deployment section is rewritten
to match, including why those two settings are load-bearing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAC2F5PayPstKTrF2NLp9
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for qauth-docs ready!

Name Link
🔨 Latest commit 1cd960f
🔍 Latest deploy log https://app.netlify.com/projects/qauth-docs/deploys/6a8e76f060675c00081e32d3
😎 Deploy Preview https://deploy-preview-395--qauth-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@EsTharian
EsTharian merged commit 06818bb into main Aug 26, 2026
12 checks passed
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