File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Database Migrations
2+ on :
3+ push :
4+ paths :
5+ - prisma/migrations/**
6+ branches :
7+ - main
8+
9+ jobs :
10+ deploy-migrations :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 18'
20+ cache : ' npm'
21+
22+ - name : Install dependencies
23+ run : npm ci
24+
25+ - name : Apply database migrations
26+ run : npx prisma migrate deploy
27+ env :
28+ DATABASE_URL : ${{ secrets.DATABASE_URL }}
29+
30+ - name : Verify migration status
31+ run : npx prisma migrate status
32+ env :
33+ DATABASE_URL : ${{ secrets.DATABASE_URL }}
Original file line number Diff line number Diff line change 1212 "db:studio" : " prisma studio" ,
1313 "db:update" : " prisma format && prisma db push && prisma generate" ,
1414 "dev" : " next dev" ,
15- "postinstall" : " prisma format && prisma generate && prisma migrate deploy " ,
15+ "postinstall" : " prisma format && prisma generate" ,
1616 "lint" : " next lint" ,
1717 "start" : " next start" ,
1818 "test" : " jest" ,
You can’t perform that action at this time.
0 commit comments