You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `syncSupabaseEnvVars` build extension syncs environment variables from your Supabase project to Trigger.dev. It uses [Supabase Branching](https://supabase.com/docs/guides/deployment/branching) to automatically detect branches and build the appropriate database connection strings and API keys for your environment.
227
+
228
+
<AccordionGroup>
229
+
<Accordiontitle="Setting up authentication">
230
+
You need to set the `SUPABASE_ACCESS_TOKEN` and `SUPABASE_PROJECT_ID` environment variables, or pass them
231
+
as arguments to the `syncSupabaseEnvVars` build extension.
232
+
233
+
You can generate a `SUPABASE_ACCESS_TOKEN` in your Supabase [dashboard](https://supabase.com/dashboard/account/tokens).
234
+
</Accordion>
235
+
236
+
<Accordiontitle="Running in Vercel environment">
237
+
When running the build from a Vercel environment (determined by checking if the `VERCEL`
238
+
environment variable is present), this extension is skipped entirely.
239
+
</Accordion>
240
+
</AccordionGroup>
241
+
242
+
<Note>
243
+
For `prod` and `dev` environments, this extension uses credentials from your default Supabase
244
+
branch. For `preview` and `staging` environments, it matches the git branch name to a Supabase
245
+
branch and syncs the corresponding database connection strings and API keys.
Copy file name to clipboardExpand all lines: docs/vercel-integration.mdx
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,8 +105,12 @@ The following variables are excluded from the Vercel → Trigger.dev sync:
105
105
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.
106
106
107
107
<Tip>
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).
108
+
If you use [Supabase Branching](https://supabase.com/docs/guides/deployment/branching) or [Neon
109
+
Database Branching](https://neon.tech/docs/guides/branching-intro) for preview environments,
110
+
disable syncing for database env vars on the Environment Variables page and use the
111
+
[syncSupabaseEnvVars](/config/extensions/syncEnvVars#syncsupabaseenvvars) or
112
+
[syncNeonEnvVars](/config/extensions/syncEnvVars#syncneonenvvars) build extensions instead. These
113
+
extensions automatically resolve the correct branch-specific credentials at build time.
0 commit comments