Push changes to database #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: Push changes to database | |
on: | |
push: | |
paths: | |
- '*.sql' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
PROJECT_ID: ${{ secrets.SUPABASE_REF_ID }} | |
SUPABASE_DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
node-version: 16 | |
- run: npx supabase link --project-ref $PROJECT_ID -p $SUPABASE_DB_PASSWORD | |
- run: npx supabase db push |