Skip to content

Commit e5733d1

Browse files
authored
Merge pull request #443 from trycompai/mariano/fix-migrations-dev-2
Add GitHub workflow to run database migrations on dev branch
2 parents 34ce6a0 + b78bab0 commit e5733d1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Database Migrations
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch: # Allows manual triggering
8+
9+
env:
10+
BUN_VERSION: "1.0.26"
11+
12+
jobs:
13+
migrate:
14+
name: Run Database Migrations
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Bun
22+
uses: oven-sh/setup-bun@v1
23+
with:
24+
bun-version: ${{ env.BUN_VERSION }}
25+
26+
- name: Install dependencies
27+
run: bun install
28+
29+
- name: Apply database migrations
30+
env:
31+
DATABASE_URL: ${{ secrets.DATABASE_URL_DEV }}
32+
run: |
33+
cd packages/db
34+
bunx prisma migrate deploy

0 commit comments

Comments
 (0)