-
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (30 loc) · 908 Bytes
/
deploy-db.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy Database
on:
push:
branches:
- main
jobs:
deploy-db:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js and Yarn
uses: actions/setup-node@v4
with:
registry-url: https://registry.yarnpkg.com
- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Yarn dependencies
run: yarn install
- name: Apply all pending migrations to the database
run: npx prisma migrate deploy
env:
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }}
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }}