From 35d857ef2e5827b97effa1440fd38d6424ffc9e4 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Wed, 1 Oct 2025 17:16:28 -0700 Subject: [PATCH] fix(trigger): inject project id env var in correctly (#1520) --- .github/workflows/trigger-deploy.yml | 6 ++++-- apps/sim/trigger.config.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-deploy.yml b/.github/workflows/trigger-deploy.yml index b8af076a6..ad8b0675a 100644 --- a/.github/workflows/trigger-deploy.yml +++ b/.github/workflows/trigger-deploy.yml @@ -13,6 +13,7 @@ jobs: cancel-in-progress: false env: TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }} + TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }} steps: - name: Checkout code @@ -32,11 +33,12 @@ jobs: run: bun install - name: Deploy to Trigger.dev (Staging) - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.ref == 'refs/heads/staging' working-directory: ./apps/sim run: npx --yes trigger.dev@4.0.4 deploy -e staging - name: Deploy to Trigger.dev (Production) - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' working-directory: ./apps/sim run: npx --yes trigger.dev@4.0.4 deploy + diff --git a/apps/sim/trigger.config.ts b/apps/sim/trigger.config.ts index db82a30a5..f42bd8cc8 100644 --- a/apps/sim/trigger.config.ts +++ b/apps/sim/trigger.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from '@trigger.dev/sdk' import { env } from './lib/env' export default defineConfig({ - project: env.TRIGGER_PROJECT_ID ?? '', + project: env.TRIGGER_PROJECT_ID!, runtime: 'node', logLevel: 'log', maxDuration: 600,