Skip to content

Commit 5fc0086

Browse files
ci(trigger): auto-deploy Trigger.dev tasks to dev-sim on dev pushes
Add a deploy-trigger-dev job that runs `trigger.dev deploy --env preview --branch dev-sim` on pushes to the dev branch, replacing the manual step. Gated after migrate-dev for the same reason as build-dev: the new task code runs against the dev DB, so the schema must be pushed first. Uses Trigger.dev's remote build (no --local-build), so the runner needs no Docker/buildx. Requires a TRIGGER_ACCESS_TOKEN repo secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK
1 parent b8e88b1 commit 5fc0086

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,44 @@ jobs:
130130
provenance: false
131131
sbom: false
132132

133+
# Dev: deploy Trigger.dev background tasks to the preview "dev-sim" branch.
134+
# Gated after migrate-dev for the same reason as build-dev — the new task
135+
# code runs against the dev DB, so the schema must be pushed first.
136+
deploy-trigger-dev:
137+
name: Deploy Trigger.dev (Dev)
138+
needs: [migrate-dev]
139+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
140+
runs-on: blacksmith-4vcpu-ubuntu-2404
141+
steps:
142+
- name: Checkout code
143+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
144+
145+
- name: Setup Bun
146+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
147+
with:
148+
bun-version: 1.3.13
149+
150+
- name: Cache Bun dependencies
151+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
152+
with:
153+
path: |
154+
~/.bun/install/cache
155+
node_modules
156+
**/node_modules
157+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
158+
restore-keys: |
159+
${{ runner.os }}-bun-
160+
161+
- name: Install dependencies
162+
run: bun install --frozen-lockfile
163+
164+
- name: Deploy to Trigger.dev
165+
working-directory: ./apps/sim
166+
env:
167+
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
168+
TRIGGER_PROJECT_ID: proj_kufttkwzywcydwtccqhx
169+
run: bunx trigger.dev@4.4.3 deploy --env preview --branch dev-sim
170+
133171
# Main/staging: build AMD64 images and push to ECR + GHCR
134172
build-amd64:
135173
name: Build AMD64

0 commit comments

Comments
 (0)