Skip to content

Vercel deployment

Both repos deploy to Vercel via GitHub integration. Pushes to main deploy to production; pushes to any other branch produce a preview deployment.

SurfaceURL
App (the demo)https://lending-agent-oversight.vercel.app
Docshttps://lending-agent-oversight-docs.vercel.app

Two Vercel projects, one per repo:

Vercel projectGitHub repoFramework preset
lending-agent-oversightbgood11/lending-agent-oversightNext.js (auto-detected)
lending-agent-oversight-docsbgood11/lending-agent-oversight-docsAstro (auto-detected)

Both projects use the default build commands; no overrides are required.

ProjectInstallBuildOutput
Apppnpm installpnpm build.next
Docspnpm installpnpm builddist

Vercel’s GitHub app is installed on the repos. On every push:

  1. Vercel detects the changed files and starts a build.
  2. The build runs the framework’s default lint and build pipeline.
  3. On success, Vercel publishes a deployment.
  4. Pushes to main get the production alias; pushes to other branches get a preview alias.

Pull requests get a preview comment from the Vercel bot with the preview URL, build status, and a screenshot diff (Astro only; the app’s diff is text-based).

AspectPreviewProduction
URL patternhttps://<project>-<sha7>-<scope>.vercel.apphttps://<project>.vercel.app (and any custom domain)
LifetimeUntil the branch is deleted or 30 days idleUntil replaced by the next push to main
AuthVercel password protection optionalPublic
NODE_ENVproduction (Vercel does not run dev mode)production
Env varsThe Preview setThe Production set
CacheIndependent cache per deploymentLong-lived

Preview URLs are useful for sharing in-progress work. They are not search-indexed (Vercel adds noindex headers on preview deployments).

The app and docs both use Vercel’s defaults. If you need to override:

// vercel.json (only required if customising)
{
"framework": "nextjs",
"buildCommand": "pnpm build",
"outputDirectory": ".next",
"installCommand": "pnpm install --frozen-lockfile"
}

The repos do not currently carry a vercel.json. Add one only when you need to deviate from the framework preset (e.g. custom edge regions, custom rewrites).

Default. Vercel auto-distributes static assets globally and runs server-side rendering in iad1 (Washington, DC) by default. For UK-only deployment with data residency requirements, override in vercel.json:

{
"regions": ["lhr1"]
}

lhr1 is London. Production-grade UK data residency requires more than this (database in the UK, object store in eu-west-2, monitoring data in the UK), tracked in Production hardening.

Terminal window
cd lending-agent-oversight
pnpm dlx vercel link
# prompts for scope (your team) and project (existing or new)
pnpm dlx vercel # deploy preview
pnpm dlx vercel --prod # deploy production (requires write access)

The CLI is rarely needed; GitHub auto-deploy handles the loop. Use it for one-off preview deploys from branches that should not push to GitHub yet.

Vercel’s build runner uses Node.js 20. The repos do not pin a Node version in package.json; Vercel detects the latest LTS. To pin:

package.json
{
"engines": {
"node": "20.x"
}
}

Pin only if a build breaks on the runner’s default version.

Vercel’s project dashboard shows build logs and runtime logs. Build logs persist indefinitely; runtime logs persist for 7 days on the Hobby plan, longer on paid plans. For longer retention, ship runtime logs to a sink (Datadog, Logtail, Better Stack), see Production hardening.

From the Vercel dashboard, “Deployments” tab, click any prior production deployment, then “Promote to Production”. Atomic alias swap, no rebuild, takes seconds. The previous build is preserved and can be re-promoted.

For repository-level rollback, revert the offending commit on main; the next push triggers a fresh production build.