-
Notifications
You must be signed in to change notification settings - Fork 309
52 lines (52 loc) · 2.1 KB
/
trigger-tasks-deploy-main.yml
File metadata and controls
52 lines (52 loc) · 2.1 KB
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
43
44
45
46
47
48
49
50
51
52
name: Deploy to Trigger.dev (dev)
on:
push:
branches:
- main
jobs:
deploy:
runs-on: warp-ubuntu-latest-arm64-4x
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "22.x" # Updated to match Node.js w/ Vercel
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Clear cache
run: rm -rf node_modules .bun
- name: Install dependencies
run: bun install --frozen-lockfile || bun install --frozen-lockfile --ignore-scripts
- name: Install DB package dependencies
working-directory: ./packages/db
run: bun install --frozen-lockfile --ignore-scripts
- name: Install Email package dependencies
working-directory: ./packages/email
run: bun install --frozen-lockfile --ignore-scripts
- name: Install Integration Platform package dependencies
working-directory: ./packages/integration-platform
run: bun install --frozen-lockfile --ignore-scripts
- name: Build DB package
working-directory: ./packages/db
run: bun run build
- name: Build Integration Platform package
working-directory: ./packages/integration-platform
run: bun run build
- name: Generate Prisma clients
run: |
cd packages/db && node scripts/generate-prisma-client-js.js
cd ../..
cd apps/app && mkdir -p prisma/schema
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
bunx prisma generate --schema=prisma/schema
- name: 🚀 Deploy Trigger.dev
working-directory: ./apps/app
timeout-minutes: 20
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
VERCEL_ACCESS_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}
run: bunx trigger.dev@4.4.3 deploy --env staging --log-level debug