-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.04 KB
/
migrate.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
37
38
39
40
41
42
name: Migrate
on:
push:
branches:
- main
defaults:
run:
working-directory: ./remix-ui
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get package manager version
id: get-pnpm-version
run: echo "version=$(cat package.json | jq -r .packageManager | sed s/pnpm@//)" >> $GITHUB_OUTPUT
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.get-pnpm-version.outputs.version }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: remix-ui/package.json
cache-dependency-path: remix-ui/pnpm-lock.yaml
cache: pnpm
- name: Download deps
run: pnpm install --frozen-lockfile
- name: Apply all pending migrations to the database
run: pnpm prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DATABASE_URL }}