Deploy database changes to Supabase's Production database. #22
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: production-deploy | |
run-name: Deploy database changes to Supabase's Production database. | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
prisma-migrate-deploy: | |
name: Run prisma migrations | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DATABASE_DIRECT_URL: ${{ secrets.DATABASE_DIRECT_URL }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
node-version-file: '.nvmrc' | |
- run: npx [email protected] migrate deploy |