Skip to content

chore: add Supabase migration deploy workflow#3

Merged
zacharias-ona merged 1 commit into
mainfrom
chore/supabase-migrations-workflow
Apr 14, 2026
Merged

chore: add Supabase migration deploy workflow#3
zacharias-ona merged 1 commit into
mainfrom
chore/supabase-migrations-workflow

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

What

Adds a GitHub Actions workflow that deploys Supabase migrations on push to main and verifies critical tables/columns exist via the PostgREST API.

How

  • Uses supabase/setup-cli@v1 to install the Supabase CLI
  • Links to the project via SUPABASE_PROJECT_ID secret
  • Runs supabase db push to apply pending migrations
  • Verifies tables (page_versions, collections, collection_views, collection_rows, comments) and columns (pages.is_private, pages.cover, pages.share_token) exist in the schema cache
  • Also supports workflow_dispatch for manual runs

Required secrets

  • SUPABASE_ACCESS_TOKEN
  • SUPABASE_DB_PASSWORD
  • SUPABASE_PROJECT_ID
  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY

Testing

Workflow syntax validated. Will run on first push to main with migrations present.

Checklist

  • CI passes
  • No any types
  • Tests added for new logic — N/A (CI workflow only)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 14, 2026 3:39pm

Request Review

-H "Authorization: Bearer ${SUPABASE_KEY}" 2>&1)
if echo "$body" | grep -qE "PGRST(204|205)"; then
echo "MISSING COLUMN: ${table}.${column} — $body"
failed+=("${table}.${column}}")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: extra } — this appends values like pages.is_private} to the failed array, corrupting the error summary on line 76.

Suggested change
failed+=("${table}.${column}}")
failed+=("${table}.${column}")

@zacharias-ona zacharias-ona merged commit b4945b6 into main Apr 14, 2026
3 checks passed
@zacharias-ona zacharias-ona deleted the chore/supabase-migrations-workflow branch April 14, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant