Files
supabase/apps/docs/content/troubleshooting/vercel-integration-environment-variables-not-syncing-for-persistent-git-branches-b9191e.mdx
supabase-supabase-autofixer[bot] b4da9f213c [bot] Sync from supabase/troubleshooting (#44967)
This PR syncs the latest troubleshooting guides from the
supabase/troubleshooting repository.

---------

Co-authored-by: github-docs-bot <github-docs-bot@supabase.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2026-04-17 17:33:41 +02:00

26 lines
1.4 KiB
Plaintext

---
title = "Vercel Integration: Environment variables explained"
topics = [ "platform" ]
keywords = []
---
Vercel has three environments, which map to different stages of the deployment lifecycle:
- **Production** is used for the branch configured as the production branch (usually main). Deployments from that branch go to the live site.
- **Preview** is used for all other Git branches, including pull requests, feature branches, and persistent branches like staging. If you deploy a staging branch, it still runs under the Preview environment unless you explicitly create a separate environment in Vercel and map that branch to it.
- **Development** is only used for local development via the Vercel CLI (`vercel dev`). It allows your local environment to pull env vars from Vercel, but it does not apply to Git branches or deployments on the platform.
### Creating a staging environment
On the Hobby plan, staging is implemented by scoping Preview environment variables to a branch. On the Pro plan, staging can be configured as a dedicated environment with its own settings.
You can create a dedicated environment (Vercel Pro):
1. Go to `Project` → `Settings` → `Environments`
2. Click `Create Environment`
3. Name it `staging`
4. Enable `Branch Tracking` and select the `staging` branch
5. Add environment variables scoped to this environment
With this setup, the staging branch deploys to its own environment and is fully separate from Preview and Production.