chore: test github migration action #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Supabase Migrations | |
on: | |
push: | |
branches: | |
- main # Adjust this to your main development branch | |
paths: | |
- 'apps/supabase/**' # Adjust this path to where your Supabase project is located in the monorepo | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Install Supabase CLI | |
run: | | |
curl -L https://github.com/supabase/cli/releases/latest/download/supabase_linux -o /tmp/supabase | |
chmod +x /tmp/supabase | |
- name: Link Supabase Project | |
run: /tmp/supabase link --project-ref kvdrzfyetdzigjkmgwgn --anon-key "$SUPABASE_ANON_KEY" --service-role-key "$SUPABASE_SERVICE_ROLE_KEY" | |
env: | |
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
working-directory: ./apps/supabase | |
- name: Deploy Edge Functions | |
run: /tmp/supabase functions deploy --env production | |
working-directory: ./apps/supabase | |
- name: Run DB Migrations | |
run: /tmp/supabase db push --env production | |
working-directory: ./apps/supabase |