Skip to content

chore: test github migration action #3

chore: test github migration action

chore: test github migration action #3

name: Supabase Migrations
on:
push:
branches:
- main # or your default branch
paths:
- 'apps/supabase/**' # Trigger only when there are changes in the Supabase app
jobs:
run-migrations:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2 # Ensure this is the latest version
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Download Supabase CLI
run: |
curl -L https://github.com/supabase/cli/releases/latest/download/supabase_linux_amd64 -o supabase
chmod +x supabase
- name: Run Supabase Migrations
run: |
./supabase link --project-ref kvdrzfyetdzigjkmgwgn --anon-key "$ANON_KEY" --service-role-key "$SERVICE_ROLE_KEY"
./supabase db push
env:
ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
working-directory: ./apps/supabase