Skip to content

Vercel how-to

Two Vercel projects from one monorepo:

ProjectWhatHow you ship
Next brochure appProduction marketing siteGit and/or pnpm run deploy
Public docsVitePress engineering notesSeparate project, Git only

Install

CLI

bash
pnpm add -D vercel
pnpm exec vercel login
pnpm exec vercel link    # one project link per folder — do not mix app + docs

Dashboard

  1. Import the GitHub repo at vercel.com.
  2. Framework: Next.js for the app (auto-detected).
  3. pnpm install when pnpm-lock.yaml is present.

Commands

bash
pnpm run build
pnpm test                 # optional
pnpm run deploy           # vercel --prod

Agent sessions should require explicit human Allow before production deploy.

Implementation examples

Brochure app

SettingValue
FrameworkNext.js
Installpnpm from lockfile
Buildpnpm run build

Public docs (second project)

SettingValue
FrameworkOther
Buildpnpm run docs:public:build
Outputdocs-public/.vitepress/dist
bash
pnpm run docs:public:build
pnpm run docs:public:preview   # verify locally before push
pnpm exec vercel deploy --prod --yes --project=docs-public

Do not use pnpm run deploy for docs — that targets the brochure Next project. Root vercel.json sets cleanUrls for VitePress paths without .html.

Env vars

bash
pnpm exec vercel env add MY_SECRET production

DNS for a custom domain: Publishing.

CI note

A typical PR gate runs pnpm run check:unit only — add Playwright / deploy jobs separately if needed.

Frontend Corner — agent ops, tooling, and decision records