Vercel 17 ▲ Monorepos, Microfrontends & Custom CI/CD — Configuring Turborepo remote caching, prebuilt artifacts, and Deploy Hooks
A monorepo is a bet that the codebases will someday need to share something — a UI package, a config, a type definition, a utility — and that the cost of keeping them separate will outweigh the cost of keeping them together. The bet is usually right. The problem is that Vercel’s default deployment model assumes one project, one repository, one build command. A monorepo with four apps and six shared packages does not fit that model without an explicit mapping: which directory is the project, which build command applies to it, and how to avoid rebuilding four apps when only one changed.
The answer to the first question is the Root Directory setting on the project. The answer to the second is turbo run build --filter=<app> — the same Turborepo that Vercel’s build system is built on. The answer to the third is the Ignored Build Step, a shell command whose exit code decides whether a build runs at all. Vercel ships turbo-ignore for exactly that job: it exits 0 when the app’s dependency graph is unchanged and skips the build, and exits 1 when something the app actually depends on has shifted.
Turborepo’s remote cache is the piece that makes this translate into minutes saved rather than minutes lost. Every build that produces an artifact hashes the source tree and the input environment, and if another run has produced the same hash before — on a teammate’s laptop, on a previous CI run, in a different branch — the outputs are restored from a shared store rather than rebuilt. Vercel hosts that store, and TURBO_TOKEN plus TURBO_TEAM are the credentials that connect to it.
Prebuilt artifacts take the same idea to its logical conclusion. Instead of Vercel building the application on its infrastructure, vercel build runs the build wherever you want — a CI job, a laptop, a custom runner — and produces a .vercel/output directory with the Build Output API’s required structure. vercel deploy --prebuilt then uploads that directory as-is. The build happens once, in an environment you control, and the deployment is just an upload.
Microfrontends and Deploy Hooks solve the two remaining problems: composition and triggering. Microfrontends compose multiple independent projects into one routing table so that /dashboard and /marketing can be deployed by different teams at different cadences and still appear as one application to the visitor. Deploy Hooks are a single secret URL that causes a new deployment when something POSTs to it — the standard way a CMS publishes a rebuild trigger, or a cron job rebuilds an hourly page.
This chapter walks through the four pieces in the order they interlock: the monorepo configuration and its filters, the Turborepo cache and its credentials, the prebuilt pipeline and its environment variables, and finally the composition and triggering layers that sit on top.
Key point: A monorepo on Vercel is one project per app, each with its own Root Directory and filtered build command, and the three mechanisms that make it fast — the Ignored Build Step, the Turborepo remote cache, and prebuilt artifacts — are all optional individually but only add up when they are used together.
Why it exists
The scale problem. A monorepo with one app is a regular project. A monorepo with twelve apps and eight shared packages is a build orchestrator’s problem: the naive configuration runs every app’s build every time any file changes, which means a one-line copy edit in a README triggers twelve full production builds. The Ignored Build Step, the filter, and the dependency graph all exist to cut that down to the one or two apps that actually changed.
The duplication problem. The reason to prefer a monorepo is that packages/ui should be installed once and reused by four apps, not copy-pasted into each one. But the reason to deploy them separately is that each app has its own traffic profile, its own environment variables, its own domain, and its own rollback history. Vercel’s project model resolves this by letting each app be its own project that happens to read from the same repository, and the shared packages are just files the build system resolves at build time.
The caching problem. Without a cache, every CI run rebuilds the same frontend from scratch. With a cache, a green CI run in a feature branch can warm the cache for the main branch, and a rollback can restore an entire build output in seconds. The cache is the difference between a two-minute deploy and a twelve-minute deploy, and the reason remote cache exists at all is that local caching cannot cross the gap between a laptop and CI.
The build-minutes problem. Vercel bills build minutes, and build minutes scale with the number and size of apps. Prebuilt deployments move the build minutes to your CI, which changes the billing model but more importantly makes the build reproducible: the artifact you deployed is the exact artifact that CI tested. Combined with a cache, the prebuilt pipeline turns “deploy a Vercel app” into “upload a prebuilt folder,” which is both faster and more auditable.
The composition problem. A monorepo often maps to an application with distinct sections — marketing on /, docs on /docs, dashboard on /dashboard — that change at different rates. Managing them in one deployment means one team’s slow approval gates everyone else’s release. Microfrontends split the routing table across projects, so each section deploys on its own schedule while the visitor sees one URL and one navigation.
The trigger problem. Not every rebuild is triggered by a git push. A CMS publish, a product inventory sync, a nightly schedule, a manual “rebuild now” button — none of these have a commit attached. Deploy Hooks exist to give all of them the same interface: an authenticated POST that behaves like a push, without the user needing a Vercel account or access to the git remote.
The trade-off. Every layer adds a failure mode. The Ignored Build Step can incorrectly skip a build if the dependency graph is misconfigured. The remote cache can serve stale outputs if the input hash is wrong. Prebuilt deploys can diverge from the git HEAD if the checkout is on the wrong commit. Microfrontends introduce a new failure mode where one of the composed apps is down and the others are fine. Each mechanism is worth using, but each one is worth understanding before it is turned on.
a. Monorepo configuration — Root Directory, filters, and the Ignored Build Step
Each app in a monorepo becomes a Vercel project. The one setting that distinguishes it is Root Directory, which tells Vercel where the app lives inside the repository. From that point on, the project’s build, install, and output paths are resolved relative to that directory, which is why a project rooted at apps/web looks exactly like a single-app repository from its own perspective.
my-monorepo/
├── apps/
│ ├── web/ ← Vercel project, Root Directory = apps/web
│ ├── docs/ ← Vercel project, Root Directory = apps/docs
│ └── dashboard/ ← Vercel project, Root Directory = apps/dashboard
├── packages/
│ ├── ui/ ← no Vercel project, shared library
│ ├── config/ ← no Vercel project, shared library
│ └── database/ ← no Vercel project, shared library
├── package.json
├── pnpm-workspace.yaml
└── turbo.json
The build command for each project is filtered to the app, and includes the ... suffix, which means “the app and everything it depends on.” Without the suffix, Turborepo would rebuild only the app itself and miss the changed package underneath it.
# Inside the project rooted at apps/web
# "web..." means web plus its workspace dependencies
turbo run build --filter=web...
The Ignored Build Step is a second, independent command whose exit code decides whether the build is skipped. Vercel’s convention is exit 0 to skip, exit 1 to proceed. turbo-ignore reads the Turborepo dependency graph, compares it to the git history, and produces that exit code:
# Exit 0 skips the build; exit 1 proceeds with it
# "web" is the workspace package name, not the directory
npx turbo-ignore web --fallback=HEAD^
The --fallback flag handles the case where the comparison commit does not exist — a fresh clone, a shallow clone, or a first push to a new branch — by comparing against HEAD^ instead. Without it, the first build on a new branch would always run, which is not wrong but also not the reason the flag exists: a shallow clone without the fallback would fail entirely.
The Ignored Build Step is per-project and evaluated before the build starts, so a skipped build costs nothing and produces a “canceled” deployment record. The dependency graph that turbo-ignore uses is the same graph turbo run uses, which means the two are always in agreement — a file that changes the app but not packages/ui triggers one build, a file in packages/ui triggers three.
b. Turborepo remote caching — the token, the team, and the input hash
The Turborepo cache is content-addressed. Each task’s hash is derived from the task’s inputs — the file tree, the environment variables listed in turbo.json, the package.json scripts, the lockfile — and the task’s outputs are stored under that hash. When the same hash is requested again, the outputs are restored rather than recomputed.
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["tsconfig.base.json", ".env.production"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"],
"inputs": ["$TURBO_DEFAULT$", ".env.production"],
"env": ["NEXT_PUBLIC_API_URL"]
},
"lint": {
"cache": false
}
}
}
The outputs array is the most consequential field. Whatever is not listed here is not cached, and a task that lists the wrong outputs will appear to cache successfully while serving a build with the wrong client bundle. .next/** with !.next/cache/** is the standard Next.js entry: it caches the compiled output but excludes the incremental build cache, which is itself regenerated cheaply and would balloon the store. The inputs array extends the default hash — $TURBO_DEFAULT$ is the whole file tree — with specific environment files, and env declares the environment variables that affect the output. A variable that affects the build but is absent from env is the most common cause of a cache serving a stale client bundle.
The remote cache is enabled with two environment variables. TURBO_TOKEN is a Vercel access token with permission to read and write the cache, and TURBO_TEAM identifies the team whose cache namespace is being used:
# In your local shell, or CI, or Vercel project settings
export TURBO_TOKEN="<vercel-access-token>"
export TURBO_TEAM="<team-slug>"
In a Vercel-hosted build, both are injected automatically when the project is linked to a team whose Turborepo cache is enabled. In a custom CI runner, they need to be set explicitly — a GitHub Actions secret is the usual carrier:
- name: Build
run: npx turbo run build --filter=web...
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
The remoteCache.signature option, when enabled, signs cache entries with a secret key so that the client can verify that an entry was produced by a trusted pipeline. It is optional but recommended for teams that share a cache namespace across many CI jobs, because without it any pipeline with the token can poison the cache for every other pipeline.
The observable effect is a build log line that says cache hit, replaying logs instead of cache miss, executing. On a warm cache, a full app build that usually takes two minutes completes in three seconds, and the artifact is byte-identical to the last run because it was not rebuilt.
c. Prebuilt artifacts — vercel pull, vercel build, vercel deploy --prebuilt
The prebuilt pipeline replaces Vercel’s remote build with a local one, and it is deliberately a three-command sequence with a different job at each step. The commands are the same ones the Vercel CLI uses internally, which is why the pipeline behavior matches a hosted build.
vercel pull fetches the project’s configuration — environment variables, vercel.json, the project ID — into a local .vercel directory. It is the step that makes the build reproducible, because the build runs against the exact environment the project would use for that target:
# Fetches project settings and env vars for a specific environment
# --yes skips the interactive prompt
vercel pull --yes \
--environment=production \
--token="$VERCEL_TOKEN"
vercel build runs the project’s build command in the pulled environment and writes the output to .vercel/output in the Build Output API v3 format. The directory contains a config.json describing routes and functions, a static/ directory with the served files, and functions/ with the bundled serverless functions. The build respects the project’s Ignored Build Step, its Root Directory, and its install command:
# Runs the build with the pulled env; --prod targets production
vercel build \
--prod \
--token="$VERCEL_TOKEN"
vercel deploy --prebuilt uploads the directory. It does not rebuild, does not install, does not run any of the project’s commands — it is a pure upload of .vercel/output:
# Uploads .vercel/output as-is; --prebuilt skips the remote build
vercel deploy --prebuilt \
--prod \
--token="$VERCEL_TOKEN"
The environment variables that make this work in CI without linking the project are VERCEL_ORG_ID and VERCEL_PROJECT_ID. Both are in the project settings page and both are required when the CLI cannot infer them from a linked .vercel/project.json — which is the normal case in a CI job:
- name: Deploy
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: |
vercel pull --yes --environment=production --token="$VERCEL_TOKEN"
vercel build --prod --token="$VERCEL_TOKEN"
vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN"
The pipeline’s advantage is orthogonality. Turborepo caches the build output, the build runs in the same runner that ran the tests, and the deployment is only the upload. A broken build fails in CI before it reaches Vercel, and when the deploy succeeds, the exact artifact that was tested is the one that went live.
The pipeline’s constraint is that it must build against the right environment. A prebuilt deploy that pulled --environment=preview and then deployed --prod will serve the wrong environment variables, and the mismatch is silent — the result is a production deployment pointing at a staging database. Locking the two --environment and --prod flags to the same CI job, and to the same branch, is the mitigation.
d. Microfrontends and Deploy Hooks — composing projects and triggering them
Microfrontends turn multiple projects into one routing surface. Each project is deployed independently, and the composition is a path-based distribution: a request to / goes to the marketing project, a request to /dashboard/* goes to the dashboard project, a request to /docs goes to the docs project. The composition is defined once, in the dashboard, by grouping the projects into an application and assigning each a path. From a visitor’s perspective there is one domain and one navigation; from a deployment perspective there are three independent projects.
Example application: acme.com
├── / ──► project: acme-marketing (deploys on content PRs)
├── /docs/* ──► project: acme-docs (deploys on docs PRs)
├── /dashboard/* ──► project: acme-dashboard (deploys on app PRs)
└── /api/* ──► project: acme-api (deploys on backend PRs)
The composition is path-routed at the edge, which is why requests to /dashboard/settings reach the dashboard project without the other projects ever seeing them. Local development uses a proxy — @vercel/microfrontends — that reads the same routing table and forwards requests to the local dev servers of the individual projects, so working on one project does not require running all four.
The failure mode that microfrontends introduce is partial failure: if acme-dashboard is down, the marketing and docs projects are still up, and the visitor gets a working site with a broken /dashboard route. This is the trade-off for independent deploys, and the mitigation is to make the routing table fail closed — a missing project returns an error only for its own path, not for the whole application.
Deploy Hooks are the trigger layer for anything that is not a git push. A deploy hook is a URL produced by the project settings, instantly fired by a POST, and it accepts an optional ref in the body to target a non-default branch:
# Fires a production deployment, no body required for the default branch
curl -X POST "https://api.vercel.com/v1/integrations/deploy/prj_abc123/def456"
The response includes the new deployment’s ID and URL, which is the usable part for integrations — the CMS that fired the hook can log the deployment it caused. The hook is a per-project, per-branch credential, and the branch it deploys is fixed at creation time, not in the POST body, which is why several hooks are usually needed per project: one for main, one for any long-lived content branch.
For scheduled or third-party triggers — a nightly rebuild for an inventory page, a “publish” button on a headless CMS — the hook URL is the whole integration. The alternative is a Vercel access token and a vercel deploy command, which is more flexible but requires the caller to hold a token with broader permission than a hook needs:
# A scheduled rebuild of the main branch, in a cron job
# The hook URL is the only secret the caller needs
curl -s -X POST "$DEPLOY_HOOK_URL" \
-H "Content-Type: application/json" \
-d '{}' | jq '.job.id'
The hook URL is a secret because anyone who has it can trigger deployments, and a deployment is not free. Rotating it revokes all previous hooks for the project; generating a new one does not revoke the others, so a rotation is “delete the old, create the new,” not “create a second one.”
Complete Example Session
// ============================================
// PART 1: THE WORKSPACE ROOT
// ============================================
{
"name": "acme-monorepo",
"private": true,
"packageManager": "pnpm@9.0.0",
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"build": "turbo run build",
"lint": "turbo run lint",
"dev": "turbo run dev"
}
}
// ============================================
// PART 2: THE TURBO CONFIG
// ============================================
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["tsconfig.base.json"],
"remoteCache": {
"signature": true
},
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env.production"],
"env": ["NEXT_PUBLIC_API_URL"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
},
"lint": {
"cache": false
}
}
}
// ============================================
// PART 3: THE FILTERED BUILD
// ============================================
// In the Vercel project rooted at apps/web
// "web..." includes web and everything it depends on
turbo run build --filter=web...
// ============================================
// PART 4: THE IGNORED BUILD STEP
// ============================================
// Exit 0 skips, exit 1 proceeds
npx turbo-ignore web --fallback=HEAD^
# ============================================
# PART 5: THE CI WORKFLOW TOP
# ============================================
# .github/workflows/deploy-web.yml
# Triggered on push to main, scoped to the app
name: deploy-web
on:
push:
branches: [main]
paths:
- "apps/web/**"
- "packages/**"
# ============================================
# PART 6: THE CACHE CREDENTIALS
# ============================================
jobs:
deploy:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
# ============================================
# PART 7: THE PULL AND BUILD
# ============================================
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm turbo run build --filter=web...
- run: npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
- run: npx vercel build --prod --token=$VERCEL_TOKEN
# ============================================
# PART 8: THE PREBUILT DEPLOY
# ============================================
- run: npx vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
# ============================================
# PART 9: THE MICROFRONTEND GROUPING
# ============================================
# In Vercel dashboard > Applications
# Group the four projects, assign paths:
# acme-marketing → /
# acme-docs → /docs/*
# acme-dashboard → /dashboard/*
# acme-api → /api/*
# ============================================
# PART 10: THE DEPLOY HOOK TRIGGER
# ============================================
# Fired by a CMS publish webhook or a cron job
curl -s -X POST "$DEPLOY_HOOK_URL" \
-H "Content-Type: application/json" \
-d '{}'
The ten parts built the workspace, configured Turbo, filtered and skipped builds, wired remote-cache credentials, ran pull → build → deploy in CI, grouped the projects as a microfrontend application, and fired a deploy hook from an external trigger.
Quick Reference
Monorepo Commands
| Command | Purpose |
|---|---|
turbo run build --filter=web | Build one app only |
turbo run build --filter=web... | App plus its dependencies |
turbo run build --filter=...^web | The app’s dependencies only |
turbo-ignore web | Correct Ignored Build Step |
vercel build --cwd apps/web | Prebuilt build for a sub-app |
Turborepo Cache Settings
| Field | Effect |
|---|---|
outputs | Files restored on a cache hit |
inputs | Files included in the hash |
env | Environment variables in the hash |
cache: false | Task never cached |
remoteCache.signature | Verify cache entry signatures |
Prebuilt Environment
| Variable | Source |
|---|---|
VERCEL_TOKEN | Account access token |
VERCEL_ORG_ID | Project settings |
VERCEL_PROJECT_ID | Project settings |
TURBO_TOKEN | Vercel token with cache scope |
TURBO_TEAM | Team slug |
Deploy Hook Properties
| Property | Value |
|---|---|
| Method | POST |
| URL | api.vercel.com/v1/integrations/deploy/:project/:hook |
| Body | { "ref": "branch-name" } (optional) |
| Auth | URL acts as the credential |
Microfrontend Composition
| Concept | Meaning |
|---|---|
| Application | Group of projects with a routing table |
| Path prefix | Which project handles which URL |
| Independent deploy | Each project deploys on its own |
| Local proxy | @vercel/microfrontends for dev |
Best Practices
✅ Do This:
// List every output the build produces
"outputs": [".next/**", "!.next/cache/**"] // ✅
// Declare env vars that affect the build
"env": ["NEXT_PUBLIC_API_URL"] // ✅
// Use the fallback on new branches
npx turbo-ignore web --fallback=HEAD^ // ✅
# Match pull and deploy environments
vercel pull --environment=production // ✅
vercel deploy --prebuilt --prod // ✅
# One hook per branch that needs one
main: https://api.vercel.com/.../hook-main // ✅
stage: https://api.vercel.com/.../hook-stage // ✅
# Scope CI triggers with path filters
paths: ["apps/web/**", "packages/**"] // ✅
❌ Don’t Do This:
// Omit an output from the cache
"outputs": ["dist/**"] // misses .next // ❌
// Forget the env var in the hash
"env": [] // changes to API URL don't bust cache // ❌
// Build without a filter
turbo run build // rebuilds every app // ❌
# Pull one environment and deploy another
vercel pull --environment=preview // ❌
vercel deploy --prebuilt --prod // ❌
# Reuse one deploy hook for all branches
curl -X POST $HOOK -d '{"ref":"feat/x"}' // ❌
# Skip the ignored build step on a large monorepo
# (every push rebuilds every app) // ❌
Common Pitfalls
| Pitfall | Why It Happens | Fix |
|---|---|---|
| All apps rebuild on every push | No Ignored Build Step | Add turbo-ignore |
| Cache serves stale client bundle | Env var missing from env | Add to turbo.json |
| First branch build always runs | No fallback commit | --fallback=HEAD^ |
| Prebuilt deploy uses wrong env | Pull and deploy flags disagree | Lock them in one job |
| Cache miss on CI every run | TURBO_TOKEN not set | Set in CI secrets |
| Microfrontend 404 on one path | Path prefix misconfigured | Fix routing table |
| Deploy hook fires wrong branch | Branch fixed at creation | Create a new hook |
turbo run build slow in monorepo | No --filter | --filter=web... |
Real-World Examples
1. App-only build
turbo run build --filter=web...
2. Dependency-only build (for a shared library)
turbo run build --filter=...^ui
3. Scoped ignore
npx turbo-ignore dashboard --fallback=main
4. Cache credential export
export TURBO_TOKEN=$(cat ~/.vercel-token) TURBO_TEAM=acme
5. Pull project env
vercel pull --yes --environment=production
6. Prebuilt for sub-app
vercel build --cwd apps/web --prod
7. Deploy prebuilt
vercel deploy --prebuilt --prod
8. Microfrontend path table
/docs/*: acme-docs
/dashboard/*: acme-dashboard
9. Fire a hook from a CMS
curl -X POST $HOOK -d '{}'
10. Fire a hook on a branch
curl -X POST $HOOK -d '{"ref":"content/spring"}'
Visual
The Monorepo to Project Mapping
┌────────────────────────────────────────────────────────────┐
│ REPOSITORY VERCEL PROJECT │
│ │
│ apps/web/ ──► acme-web (root: apps/web) │
│ apps/docs/ ──► acme-docs (root: apps/docs) │
│ apps/dashboard/ ──► acme-dash (root: apps/dash) │
│ packages/ui/ ──► (no project, imported) │
│ packages/config/ ──► (no project, imported) │
│ │
│ turbo.json + lockfile ──► shared across all projects │
└────────────────────────────────────────────────────────────┘
The Ignored Build Step Decision
┌────────────────────────────────────────────────────────────┐
│ PUSH TO MAIN │
│ │ │
│ ▼ │
│ turbo-ignore web │
│ │ │
│ ├── outputs unchanged ──► exit 0 ──► SKIP │
│ └── outputs changed ──► exit 1 ──► BUILD │
│ │
│ Changed files: │
│ apps/marketing/x ──► web skipped │
│ packages/ui/y ──► web built │
└────────────────────────────────────────────────────────────┘
The Cache Hit Flow
┌────────────────────────────────────────────────────────────┐
│ turbo run build --filter=web... │
│ │ │
│ ▼ │
│ hash inputs ────► local cache ──► miss ──► remote cache │
│ │ │
│ hit ──► restore ▼ │
│ │ │
│ skip build │
│ │ │
│ TURBO_TOKEN │
└────────────────────────────────────────────────────────────┘
The Prebuilt Pipeline
┌────────────────────────────────────────────────────────────┐
│ CI RUNNER VERCEL │
│ │
│ git checkout ◄─────── VERCEL_ORG_ID, VERCEL_PROJECT_ID │
│ │ │
│ ▼ │
│ vercel pull ────────────────► env + vercel.json │
│ │ │
│ ▼ │
│ vercel build ──► .vercel/output │
│ │ │
│ ▼ │
│ vercel deploy --prebuilt ──► upload ◄── live URL │
└────────────────────────────────────────────────────────────┘
Summary
| Item | Value |
|---|---|
| Root Directory | Per-project path inside the repo |
| Filter syntax | --filter=web... |
| Ignored Build Step | turbo-ignore <name> --fallback=HEAD^ |
| Cache token | TURBO_TOKEN |
| Cache namespace | TURBO_TEAM |
| Cache signature | remoteCache.signature |
| Pull command | vercel pull --environment=production |
| Build command | vercel build --prod |
| Deploy command | vercel deploy --prebuilt --prod |
| Project IDs | VERCEL_ORG_ID, VERCEL_PROJECT_ID |
| Deploy Hook | POST /v1/integrations/deploy/:project/:hook |
Key takeaways:
- One Vercel project per app, one Root Directory per project. The root directory is where the build, install, and output paths resolve from, and it is the only thing that distinguishes a monorepo project from a single-app one.
- Filter every build.
--filter=web...builds the app and the workspace packages it depends on, and--filter=webwithout the suffix will miss a changed shared library. Theturbo-ignorecommand uses the same graph, so the skip decision and the build decision always agree. - The output list is the cache contract. A task that lists the wrong
outputscaches successfully and serves a stale build, and a task that lists the right outputs but omits an env var fromenvhashes the wrong thing. The two fields together are the whole correctness story for the remote cache. - Prebuilt deploys are three commands, not one.
vercel pullfetches the environment,vercel buildproduces.vercel/output, andvercel deploy --prebuiltuploads it. The failure that matters is pulling one environment and deploying another, which is silent and produces a production deployment pointing at staging. - Microfrontends split the routing table across projects. Each path prefix belongs to a project that deploys on its own schedule, and partial failure is the new failure mode — one project down does not take the others with it.
- Deploy Hooks are a URL credential. They fire a deployment, the branch is fixed at creation time, and rotating them means deleting the old hook and creating a new one rather than creating a second hook.
Remember: A monorepo on Vercel is one project per app, and the four mechanisms — filter, ignore, cache, prebuilt — are layers of the same optimization. The filter narrows what runs, the ignore skips what has not changed, the cache restores what has been built before, and the prebuilt pipeline runs the remainder in CI so that the deploy is only an upload. Compose microfrontends on top when the deployments need to be independent, and reach for a Deploy Hook when the trigger is not a commit.
Stop using slow, ad-bloated tool sites! 🤮
🔎 Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
✅ Finance (Mortgage, Interest, Inflation)
✅ Tech (Base64, JSON, Dev Suite, IP)
✅ Health (BMI, BMR, TDEE)
✅ Productivity (Timer, Workspace, QR)
⚡️ Fast & Private
🔒 No data leaves your device
💎 100% Free
🔗 Use it now: https://tools.kandz.me
🔖 Bookmark it—you’ll need it later!