Skip to content

Commit a98b34f

Browse files
[dev] [Marfuen] mariano/fix-trigger-2 (#1802)
* chore(prisma): add script to copy schema and generate client in deploy --------- Co-authored-by: Mariano Fuentes <[email protected]>
1 parent b68d2dd commit a98b34f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/trigger-tasks-deploy-main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
- name: Generate Prisma client
2828
working-directory: ./packages/db
2929
run: bunx prisma generate
30+
- name: Copy schema to app and generate client
31+
working-directory: ./apps/app
32+
run: |
33+
mkdir -p prisma
34+
cp ../../packages/db/dist/schema.prisma prisma/schema.prisma
35+
bunx prisma generate
3036
- name: 🚀 Deploy Trigger.dev
3137
working-directory: ./apps/app
3238
timeout-minutes: 20

apps/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
"dev": "bun i && bunx concurrently --kill-others --names \"next,trigger\" --prefix-colors \"yellow,blue\" \"next dev --turbo -p 3000\" \"bunx [email protected] dev\"",
165165
"lint": "next lint && prettier --check .",
166166
"prebuild": "bun run db:generate",
167+
"postinstall": "prisma generate --schema=./prisma/schema.prisma || exit 0",
167168
"start": "next start",
168169
"test": "vitest",
169170
"test:all": "./scripts/test-all.sh",

0 commit comments

Comments
 (0)