Skip to content

Merge pull request #2511 from trycompai/fix/email-unsubscribe-import #472

Merge pull request #2511 from trycompai/fix/email-unsubscribe-import

Merge pull request #2511 from trycompai/fix/email-unsubscribe-import #472

name: Deploy API to Trigger.dev (dev)
on:
push:
branches:
- main
permissions:
contents: read
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
with:
bun-version: "1.3.4"
- 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 Integration Platform package dependencies
working-directory: ./packages/integration-platform
run: bun install --frozen-lockfile --ignore-scripts
- name: Build Integration Platform package
working-directory: ./packages/integration-platform
run: bun run build
- name: Build Email package
working-directory: ./packages/email
run: bun run build
- name: Build DB package
working-directory: ./packages/db
run: bun run build
- name: Copy model files to api schema dir
working-directory: ./apps/api
run: |
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
- name: 🚀 Deploy Trigger.dev
working-directory: ./apps/api
timeout-minutes: 20
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
run: bunx trigger.dev@4.4.3 deploy --env staging --log-level debug