Skip to content

Deployment

Deployment workflows, CI/CD pipelines, and production operations for Supabase Edge Functions.

Guides

Deployment Guide

Step-by-step deployment instructions:

  • Database migrations via supabase db push
  • Edge Function deployment
  • Secrets configuration
  • Deployment verification

Branching Setup

Multi-environment branching strategy using Supabase branches:

Single Supabase Project
├── main branch     → production  (persistent, never deleted)
├── develop branch  → staging     (persistent, pausable)
└── pr-* branches   → preview     (ephemeral, deleted on PR close)

CI/CD Guide

GitHub Actions workflows with 3-tier validation:

  • Tier 1: Fast checks (lint, format, types) — ~2 min
  • Tier 2: Integration tests (22 E2E suites) — ~10 min
  • Tier 3: Deploy preview (optional, non-draft PRs) — ~3 min

Supabase Operations

Production operations and maintenance:

  • Common commands reference
  • Database operations (migrations, reset, status)
  • Edge Function management
  • Secrets management
  • Monitoring and logs

SDK Publishing Guide

SDK versioning, publishing, and consumption:

  • SemVer with pre-release channels (RC for staging, stable for production)
  • GitHub Packages (NPM @musingly-ai/core)
  • GitHub Releases (Python wheel musingly-core)
  • Local Verdaccio registry for cross-service development

Deployment Plan

Release planning and versioning strategy.


Deployment Workflows

Trigger Target Workflow
Push to main Production deploy-production.yml
Push to develop Staging deploy-staging.yml
PR + deploy-preview label Preview pr-checks.yml
PR closed Delete preview cleanup-preview.yml

Quick Commands

# Deploy all Edge Functions
deno task deploy

# Deploy specific function
deno task deploy graph

# Deploy only changed functions
deno task deploy:changed

# Health check deployed functions
deno task deploy:check

GitHub Secrets Required

Secret Description
SUPABASE_ACCESS_TOKEN CLI authentication
SUPABASE_PROJECT_ID Project reference ID
SUPABASE_PUBLISHABLE_KEY Anon API key
SERVICE_AUTH_SECRET_PRODUCTION Production service auth
SERVICE_AUTH_SECRET_STAGING Staging service auth