Update deployment to run migrations from VPS .env
All checks were successful
Deploy / deploy (push) Successful in 54s
All checks were successful
Deploy / deploy (push) Successful in 54s
This commit is contained in:
@@ -23,11 +23,6 @@ jobs:
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Run Database Migrations
|
||||
run: |
|
||||
cd api
|
||||
DATABASE_URL=${{ secrets.DATABASE_URL }} npx prisma migrate deploy
|
||||
|
||||
- name: Deploy API
|
||||
run: |
|
||||
pm2 stop skymoney-api || true
|
||||
@@ -35,6 +30,14 @@ jobs:
|
||||
cp -r api/dist /opt/skymoney/api/
|
||||
cp -r api/node_modules /opt/skymoney/api/
|
||||
cp -r api/prisma /opt/skymoney/api/
|
||||
|
||||
# Run migrations using the VPS .env
|
||||
cd /opt/skymoney/api
|
||||
set -a
|
||||
source .env
|
||||
set +a
|
||||
npx prisma migrate deploy
|
||||
|
||||
pm2 start /opt/skymoney/api/dist/server.js --name skymoney-api
|
||||
|
||||
- name: Deploy Web
|
||||
|
||||
Reference in New Issue
Block a user