Skip to content

Commit 354363e

Browse files
authored
docs: Vercel integration – marketplace link, Build options, Root Directory warning (#3097)
Adds a direct Vercel Marketplace link, documents configuring build options via the project config page, and adds a warning and workaround for projects using a Vercel Root Directory
1 parent 525145d commit 354363e

File tree

1 file changed

+45
-18
lines changed

1 file changed

+45
-18
lines changed

docs/vercel-integration.mdx

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ The Vercel integration connects your Vercel project to your Trigger.dev project
1010
This eliminates the need to manually run the `trigger.dev deploy` command or maintain custom CI/CD workflows for Vercel-based projects.
1111

1212
<Note>
13-
The Vercel integration requires the [GitHub integration](/github-integration) to be connected as well, since Trigger.dev builds your tasks from your GitHub repository.
13+
The Vercel integration requires the [GitHub integration](/github-integration) to be connected as
14+
well, since Trigger.dev builds your tasks from your GitHub repository.
1415
</Note>
1516

1617
## Installation
@@ -22,23 +23,27 @@ You can connect Vercel from two entry points:
2223
<Steps>
2324

2425
<Step title="Connect Vercel">
25-
Go to your project's **Settings** page and click **Connect Vercel**. This will redirect you to Vercel to authorize the Trigger.dev app.
26+
Go to your project's **Settings** page and click **Connect Vercel**. This will redirect you to
27+
Vercel to authorize the Trigger.dev app.
2628
</Step>
2729

2830
<Step title="Select a Vercel project">
2931
Choose which Vercel project to connect to your Trigger.dev project.
3032
</Step>
3133

3234
<Step title="Map environments">
33-
If your Vercel project has custom environments, choose which one maps to your Trigger.dev staging environment.
35+
If your Vercel project has custom environments, choose which one maps to your Trigger.dev staging
36+
environment.
3437
</Step>
3538

3639
<Step title="Sync environment variables">
37-
Review the environment variables that will be pulled from Vercel into Trigger.dev. You can deselect any variables you don't want to sync.
40+
Review the environment variables that will be pulled from Vercel into Trigger.dev. You can
41+
deselect any variables you don't want to sync.
3842
</Step>
3943

40-
<Step title="Configure build settings">
41-
Optionally adjust [build settings](#build-settings) for atomic deployments, env var pulling, and new env var discovery.
44+
<Step title="Configure build options">
45+
Optionally adjust [build options](#build-options) for atomic deployments, env var pulling, and new
46+
env var discovery.
4247
</Step>
4348

4449
<Step title="Connect GitHub">
@@ -52,11 +57,14 @@ You can connect Vercel from two entry points:
5257
<Steps>
5358

5459
<Step title="Install the integration">
55-
Find Trigger.dev on the Vercel Marketplace and install it. This will redirect you to Trigger.dev to complete setup.
60+
Install the [Trigger.dev integration from the Vercel
61+
Marketplace](https://vercel.com/marketplace/trigger). This will redirect you to Trigger.dev to
62+
complete setup.
5663
</Step>
5764

5865
<Step title="Select your Trigger.dev organization and project">
59-
Choose which Trigger.dev organization and project to connect. If you're new to Trigger.dev, you'll be guided through creating an organization and project.
66+
Choose which Trigger.dev organization and project to connect. If you're new to Trigger.dev, you'll
67+
be guided through creating an organization and project.
6068
</Step>
6169

6270
<Step title="Connect GitHub">
@@ -66,9 +74,21 @@ You can connect Vercel from two entry points:
6674
</Steps>
6775

6876
<Note>
69-
When installing from the Vercel Marketplace, default build settings are applied automatically. You can adjust them later in your project settings.
77+
When installing from the Vercel Marketplace, default Build options are applied automatically. You
78+
can adjust them later in your project settings.
7079
</Note>
7180

81+
<Warning>
82+
**Vercel Root Directory:** If your Vercel project uses a **Root Directory** (e.g. you deploy a
83+
single subfolder such as `app` or `web`), you may see "The specified Root Directory does not
84+
exist" after connecting the integration. If you see this error, try using the **repository root**
85+
(leave Root Directory empty) in your Vercel project settings. If your Vercel frontend build
86+
requires a Root Directory (e.g. in a monorepo), keep that setting in Vercel and instead point
87+
Trigger.dev to the subfolder by setting the **Trigger config file** path (and other [Build
88+
options](#build-options)) in your Trigger.dev project configuration. Trigger.dev always builds
89+
from the repo root.
90+
</Warning>
91+
7292
## Environment variable sync
7393

7494
The integration syncs environment variables in both directions:
@@ -78,13 +98,15 @@ The integration syncs environment variables in both directions:
7898
**Trigger.dev → Vercel**: Trigger.dev syncs API keys (like `TRIGGER_SECRET_KEY`) to your Vercel project so your app can communicate with Trigger.dev.
7999

80100
The following variables are excluded from the Vercel → Trigger.dev sync:
101+
81102
- `TRIGGER_SECRET_KEY`, `TRIGGER_VERSION`, `TRIGGER_PREVIEW_BRANCH` (managed by Trigger.dev)
82103
- Sensitive/secret-type variables (Vercel API limitation)
83104

84105
You can control sync behavior per-variable from your project's Vercel settings. Deselecting a variable prevents its value from being updated during future syncs.
85106

86107
<Tip>
87-
For dynamic environment variables (e.g., from NeonDB branching), use the `syncEnvVars` build extension instead. Learn more about [environment variables](/deploy-environment-variables).
108+
For dynamic environment variables (e.g., from NeonDB branching), use the `syncEnvVars` build
109+
extension instead. Learn more about [environment variables](/deploy-environment-variables).
88110
</Tip>
89111

90112
## Atomic deployments
@@ -94,7 +116,9 @@ Atomic deployments ensure your Vercel app and Trigger.dev tasks are deployed in
94116
Atomic deployments are enabled for the production environment by default.
95117

96118
<Note>
97-
When atomic deployments are enabled, the integration automatically disables `Auto-assign Custom Production Domains` on your Vercel project. This is required so that Vercel doesn't promote a deployment before the Trigger.dev build is ready.
119+
When atomic deployments are enabled, the integration automatically disables `Auto-assign Custom
120+
Production Domains` on your Vercel project. This is required so that Vercel doesn't promote a
121+
deployment before the Trigger.dev build is ready.
98122
</Note>
99123

100124
Previously, setting up atomic deployments with Vercel required custom GitHub Actions workflows. The Vercel integration automates this entirely. For more details on how atomic deployments work, see [Atomic deploys](/deployment/atomic-deployment).
@@ -103,27 +127,30 @@ Previously, setting up atomic deployments with Vercel required custom GitHub Act
103127

104128
The integration maps Vercel environments to Trigger.dev environments:
105129

106-
| Vercel environment | Trigger.dev environment |
107-
| --- | --- |
108-
| Production | Production |
130+
| Vercel environment | Trigger.dev environment |
131+
| ------------------ | ------------------------------ |
132+
| Production | Production |
109133
| Custom environment | Staging (you choose which one) |
110-
| Preview | Preview |
111-
| Development | Development |
134+
| Preview | Preview |
135+
| Development | Development |
112136

113137
If your Vercel project has a custom environment, you can select which one maps to your Trigger.dev staging environment during setup or in your project settings.
114138

115139
<Note>
116-
Preview deployments require the preview environment to be enabled on your project. Learn more about [preview branches](/deployment/preview-branches).
140+
Preview deployments require the preview environment to be enabled on your project. Learn more
141+
about [preview branches](/deployment/preview-branches).
117142
</Note>
118143

119-
## Build settings
144+
## Build options
120145

121146
You can configure the following settings per-environment from your project's Vercel settings:
122147

123148
- **Atomic deployments**: Controls whether Trigger.dev and Vercel deployments are synchronized. Enabled for production by default.
124149
- **Pull env vars before build**: When enabled, Trigger.dev pulls the latest environment variables from Vercel before each build. Enabled for production, staging, and preview by default.
125150
- **Discover new env vars**: When enabled, new environment variables found in Vercel that don't yet exist in Trigger.dev are created automatically during builds. Only available for environments that also have env var pulling enabled. Enabled for production, staging, and preview by default.
126151

152+
To change build options that would normally go in `trigger.config.ts` (such as [extensions](/config/config-file#extensions) or other build configuration), use **Build options** on your project's configuration page in the Trigger.dev dashboard.
153+
127154
## Disconnecting
128155

129156
You can disconnect the Vercel integration from either side:

0 commit comments

Comments
 (0)