Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/supabase-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Validate Supabase Migrations

on:
pull_request:
branches:
- develop
- main
workflow_dispatch:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: supabase/setup-cli@v1
with:
version: latest

- name: Start Supabase local development environment
run: supabase start

- name: Validate migrations
run: |
# Check if migrations can be applied without errors
supabase db reset

# Additional validation can be added here
echo "Migrations validated successfully"
25 changes: 25 additions & 0 deletions .github/workflows/supabase-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Supabase to Production

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PRODUCTION_PROJECT_ID }}
steps:
- uses: actions/checkout@v4

- uses: supabase/setup-cli@v1
with:
version: latest

- run: supabase link --project-ref $SUPABASE_PROJECT_ID

- run: supabase db push
25 changes: 25 additions & 0 deletions .github/workflows/supabase-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Supabase to Staging

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.STAGING_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_STAGING_PROJECT_ID }}
steps:
- uses: actions/checkout@v4

- uses: supabase/setup-cli@v1
with:
version: latest

- run: supabase link --project-ref $SUPABASE_PROJECT_ID

- run: supabase db push