Skip to content

Deploying ​

Every site in the monorepo (these docs and each app in apps/) is its own Cloudflare Pages project on the same GitHub repository. Production builds from main; every other branch gets a preview address.

Docs: qalim-design-systemDiary: qalim-diary
Addressqalim-design-system.pages.devqalim-diary.pages.dev
Root directory(empty: the repository root)(empty: the repository root)
Framework presetNoneNone
Build commandnpm install && npm run build:lib && npm run docs:buildnpm install && npm run build:lib && npm run build --workspace=apps/diary
Build output directorydocs/.vitepress/distapps/diary/dist
Environment variableSKIP_DEPENDENCY_INSTALL = 1SKIP_DEPENDENCY_INSTALL = 1
Nodefrom .nvmrc (22.23.3)from .nvmrc (22.23.3)

Why these settings:

  • The repository root is the root directory, so npm workspaces link @my-ds/components into the apps.
  • npm install, not npm ci: npm ci needs a lockfile, and lockfiles are not tracked.
  • SKIP_DEPENDENCY_INSTALL=1 stops Cloudflare's automatic install (the root package.json declares pnpm); the build command installs with npm instead.
  • .nvmrc sets the same Node everywhere; Cloudflare's default (22.16) is too old for Astro's dependencies.

Create a project ​

  1. In the Cloudflare dashboard, open Workers & Pages → Create → Pages → Connect to Git, and pick the repository.
  2. Enter the project name, production branch main, and the settings above.
  3. Save and Deploy. The first build takes a few minutes.

Check a deployment ​

The same browser tests run against the live site:

sh
DIARY_URL=https://qalim-diary.pages.dev npx playwright test --project=diary

Deploying happens on push to main, so it follows the versioning standard: one version bump per push, with its changelog section.