| name | supabase-ci-integration |
| description | Configure Supabase continuous-integration and deployment pipelines with
GitHub Actions: link projects, push migrations, deploy Edge Functions,
generate types, and run tests against local Supabase instances.
Use when setting up CI pipelines for Supabase, automating database
migrations, deploying Edge Functions in CI, or running integration tests.
Trigger with phrases like "supabase CI", "supabase GitHub Actions",
"supabase deploy pipeline", "CI supabase migrations", "supabase preview branches".
|
| allowed-tools | Write, Bash(npx:*), Bash(gh:*) |
| version | 1.53.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","supabase","ci-cd","github-actions","devops"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Supabase CI Integration
Overview
Build GitHub Actions workflows that automate the full Supabase lifecycle: link projects in CI, push migrations on merge, deploy Edge Functions, generate TypeScript types, run tests against a local Supabase instance, and create preview branches for pull requests. Every database change gets validated before it reaches production.
The pull-request CI pipeline runs these stages, all detailed in ci-workflows.md:
- Start a local Supabase instance (unused services disabled for speed).
- Apply every migration from scratch with
npx supabase db reset.
- Regenerate TypeScript types and fail the build on drift from the committed version.
- Run pgTAP database tests and the application test suite against the local instance.
- Stop Supabase (always, even on failure).
Prerequisites
- GitHub repository with Actions enabled
- Supabase project created at supabase.com/dashboard
- Supabase CLI initialized locally (
npx supabase init)
- Node.js 18+ in your project
@supabase/supabase-js installed:
npm install @supabase/supabase-js
Instructions
Step 1: Configure GitHub Secrets and Link in CI
Store credentials as GitHub repository secrets. The CI pipeline uses these to authenticate with your Supabase project without exposing tokens in code.
gh secret set SUPABASE_ACCESS_TOKEN --body "<your-access-token>"
gh secret set SUPABASE_DB_PASSWORD --body "<your-database-password>"
gh secret set SUPABASE_PROJECT_REF --body "<your-project-ref>"
Generate your access token at supabase.com/dashboard/account/tokens. Find your project ref in Project Settings > General.
Link the project in any CI job that needs remote access:
- name: Install Supabase CLI
uses: