This repository was archived by the owner on Aug 10, 2025. It is now read-only.
Deploy Migrations to Staging #14
This file contains hidden or 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: Deploy Migrations 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.STAGING_PROJECT_ID }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: supabase/setup-cli@v1 | |
| with: | |
| version: latest | |
| - name: Navigate to Supabase directory | |
| working-directory: ./infra/supabase # <-- Add this | |
| run: ls -la # Optional: Verify directory contents | |
| - name: Link to Supabase project | |
| working-directory: ./infra/supabase # <-- Add this | |
| run: supabase link --project-ref $SUPABASE_PROJECT_ID | |
| - name: Apply database migrations | |
| working-directory: ./infra/supabase # <-- Add this | |
| run: supabase db push --include-all | |
| - name: Seed database # <-- Replace reset with seed | |
| working-directory: ./infra/supabase # <-- Add this | |
| run: supabase db seed |