diff --git a/apps/site/README.md b/apps/site/README.md index a19abe8..52d3a01 100644 --- a/apps/site/README.md +++ b/apps/site/README.md @@ -9,4 +9,22 @@ bun run dev:site # astro dev server on 4321 bun run build:site # static output in apps/site/dist ``` -Cloudflare Pages settings: root directory `apps/site`, build command `bun run build`, output directory `dist`. Set `SITE_URL` once the site has its own domain so canonical URLs and the sitemap follow it. +## Cloudflare Pages + +The repository is a bun workspace, so dependencies have to be installed at its root with bun. Pointing Pages at this directory makes it fall back to npm, which cannot read the `workspace:*` ranges in the gateway and web manifests and fails with `EUNSUPPORTEDPROTOCOL`. Install explicitly instead: + +| Setting | Value | +|---|---| +| Root directory | empty, the repository root | +| Build command | `bun install --frozen-lockfile && bun run build:site` | +| Build output directory | `apps/site/dist` | +| Build watch paths | `apps/site/*`, `docs/*`, `bun.lock` | + +Two environment variables, both for the production and the preview environment: + +| Variable | Value | Why | +|---|---|---| +| `SKIP_DEPENDENCY_INSTALL` | `1` | Stops Pages from running `npm install` before the build command | +| `BUN_VERSION` | `1.4.2` | Matches the version CI uses | + +`SITE_URL` is optional and defaults to `https://junctio.pages.dev`. Set it once the site has its own domain; canonical URLs, the sitemap and the link to it in `robots.txt` all follow it.