Files
supabase/apps/docs/content/guides/deployment.mdx
Miranda Limonczenko 450939ce86 docs: fix the pages the Option 1 nav friction logs got stuck on (#53881)
Part of DOCS-1739

## Problem

People who tried the Option 1 navigation got stuck on these pages:

- **Slow queries:** readers looked for a way to debug a slow query and
didn't find the guide in the nav. Its title, "Log slow and failing
queries", names the mechanism, not the task.
- **JWT:** The Supabase way to build says Auth "issues a signed JWT"
without saying what a JWT is.
- **Docker self-hosting:** the guide opens with its own contents list,
which repeats the table of contents beside it.
- **Launch readiness:** readers who opened Deploy to production to ask
"am I ready to launch?" found a page about branching and environments.
Neither checklist is linked from it.

## Solution

- **Slow-query title.** The title becomes "Find slow and failing
queries", and the nav label in both navigations becomes "Find slow
queries". The description still says "log slow queries", so search keeps
matching. Five inbound links now use the new title.
- **JWT link.** The first mention reads "JSON Web Token (JWT)" and links
to the JWT guide.
- **Launch intro.** Two sentences near the top of Deploy to production
link the production checklist and the production security checklist.
- **Docker contents list.** The in-page list is gone. Nothing linked to
its anchor.


## Manual testing

1. Open [the slow-query guide on the
preview](https://docs-git-docs-nav-friction-content-supabase.vercel.app/docs/guides/observability/log-slow-queries).
The title reads "Find slow and failing queries", and the sidebar entry
reads "Find slow queries".
2. Open [The Supabase way to
build](https://docs-git-docs-nav-friction-content-supabase.vercel.app/docs/guides/getting-started/the-supabase-way-to-build).
Under Auth, "JSON Web Token (JWT)" links to the JWT guide.
3. Open [Deployment and
branching](https://docs-git-docs-nav-friction-content-supabase.vercel.app/docs/guides/deployment).
The third paragraph links both production checklists.

4. Open [Self-hosting with
Docker](https://docs-git-docs-nav-friction-content-supabase.vercel.app/docs/guides/self-hosting/docker).
The page goes from the intro straight to Before you begin, with no
Contents list.
2026-11-30 11:10:20 -08:00

77 lines
4.7 KiB
Plaintext

---
title: Deployment & Branching
---
Deploying your app makes it live and accessible to users. Most apps have at least two environments: a production environment for users and one or more staging or preview environments for development.
Supabase provides flexible options for deployment workflows of various complexity.
If you're getting ready to launch, work through the [production checklist](/docs/guides/deployment/going-into-prod) and the [production security checklist](/docs/guides/security/production-checklist) first. The rest of this page covers how changes reach your production project.
## Recommended workflow
You can deploy your Supabase project with GitHub:
1. Develop locally using the [Supabase CLI](/docs/guides/local-development)
2. Push changes to your GitHub repository
3. Deploy automatically to your Supabase project from your `main` branch
This workflow works on all plans and does not require branching.
If you have branching enabled (on the Pro Plan), you can extend this workflow with preview environments for pull requests. If you host your app on Vercel and want to point preview deployments at those preview environments, see [Preview branches on Vercel](/docs/guides/integrations/vercel-preview-branches).
## Environment management
You can maintain separate development, staging, and production environments:
- **Development**: Develop locally using the [Supabase CLI](/docs/guides/local-development)
- **Staging / Preview (optional)**: Use [branching](/docs/guides/deployment/branching) to create preview environments for pull requests or long-lived staging environments (Pro Plan)
- **Production**: Deploy changes from your GitHub repository or your own CI/CD pipeline
## Deployment
You can automate deployments using:
- The [Supabase GitHub integration](/dashboard/project/_/settings/integrations) (recommended)
- Deploy changes from your `main` branch
- Works on all plans
- With branching enabled (Pro Plan), can also create preview environments for pull requests
- The [Supabase CLI](/docs/guides/local-development) in your own continuous deployment pipeline
- The [Supabase Terraform provider](/docs/guides/deployment/terraform)
## Frequently asked questions
### Is GitHub required?
No. GitHub integration is recommended, but you can deploy using the [Supabase CLI](/docs/guides/local-development) in your own CI/CD pipeline without connecting a GitHub repository.
### Do you need a paid plan?
No. The GitHub integration and CLI-based deployments work on all plans. Branching (preview environments for pull requests) requires the Pro Plan.
### What gets deployed?
Database migrations in your `supabase/` directory, plus [Edge Functions](/docs/guides/functions) and Storage buckets that are declared in your config file (`supabase/config.toml` or `supabase/config.jsonc`). If you use [declarative schemas](/docs/guides/local-development/declarative-database-schemas), only the generated migrations are deployed and not the `supabase/schemas/` files themselves. On preview branches, config file settings such as `api` and `auth` are also applied to the branch project by default. On persistent branches, including your production branch, those settings are skipped unless you opt in with a `remotes` entry for that project. See the [local development guide](/docs/guides/local-development) for details on the directory structure.
### Can you use your own CI/CD pipeline?
Yes. You can use the [Supabase CLI](/docs/guides/local-development) or the [Terraform provider](/docs/guides/deployment/terraform) in any CI/CD system ([GitHub Actions](/docs/guides/functions/examples/github-actions), GitLab CI, CircleCI, etc.).
### How does collaboration with other developers work?
Use Git branches to work on changes independently and share them with your team. When a change is ready, merge it into `main` to deploy it to production. If you're on the Pro Plan, you can enable [branching](/docs/guides/deployment/branching) to automatically create a preview environment for each pull request, so you can review and test database changes before they go live.
### What is branching?
Branching creates isolated preview environments for each pull request, so you can test database changes before merging. It is an optional feature available on the Pro Plan. See the [branching guide](/docs/guides/deployment/branching) for details.
### What advantage does branching offer?
Branching gives each pull request its own isolated Supabase environment with a full copy of your database schema (without any production data), so you can validate migrations and test your app end-to-end before merging to `main`.
<Admonition type="note" title="Self-hosting">
Read the [self-hosting guides](/docs/guides/self-hosting) for instructions on hosting your own Supabase stack.
</Admonition>