Skip to content

Commit 3cbff2a

Browse files
committed
chore: deploy the dashboard agent per environment with gates
Deploy a leg per environment (staging + prod) via a matrix, each gated by its own environment, and trigger on pushes to main that touch the agent or its store. Both deploys are --skip-promotion, so they stage dormant versions the app pins to independently.
1 parent 85ce7fe commit 3cbff2a

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

.github/workflows/dashboard-agent-deploy.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,33 @@ name: "🤖 Deploy dashboard agent"
33
# Deploys the @internal/dashboard-agent chat.agent to its Trigger.dev project
44
# with --skip-promotion, so a deploy never becomes "current" on its own. The
55
# consuming app cuts over by pinning DASHBOARD_AGENT_VERSION to the new version.
6-
# Pushes to main that touch the agent auto-deploy to staging; prod is a manual
7-
# workflow_dispatch. The project ref + a scoped deploy PAT come from the target
8-
# environment (dashboard-agent-staging / dashboard-agent-prod).
6+
# Runs a leg per environment (staging + prod), each gated by its own environment;
7+
# a push to main that touches the agent or its store triggers both. Version
8+
# numbers are per-environment, so pin each environment to its own leg's version.
99

1010
on:
1111
push:
1212
branches: [main]
1313
paths:
1414
- "internal-packages/dashboard-agent/**"
15+
- "internal-packages/dashboard-agent-db/**"
1516
workflow_dispatch:
16-
inputs:
17-
environment:
18-
description: "Trigger.dev environment to deploy to"
19-
type: choice
20-
options: [staging, prod]
21-
default: staging
2217

2318
permissions: {}
2419

25-
concurrency:
26-
group: dashboard-agent-deploy-${{ github.event.inputs.environment || 'staging' }}
27-
cancel-in-progress: false
28-
2920
jobs:
3021
deploy:
31-
name: Deploy dashboard agent
22+
name: Deploy dashboard agent (${{ matrix.environment }})
3223
runs-on: ubuntu-latest
33-
environment: dashboard-agent-${{ github.event.inputs.environment || 'staging' }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
environment: [staging, prod]
28+
# Per-environment reviewer gate + source of the scoped deploy PAT.
29+
environment: dashboard-agent-${{ matrix.environment }}
30+
concurrency:
31+
group: dashboard-agent-deploy-${{ matrix.environment }}
32+
cancel-in-progress: false
3433
permissions:
3534
contents: read
3635
env:
@@ -68,4 +67,4 @@ jobs:
6867
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_DASHBOARD_AGENT_DEPLOY_TOKEN }}
6968
# Invoke the built CLI directly (what the workspace .bin/trigger wrapper does),
7069
# so a not-yet-linked bin after a fresh install can't break the deploy.
71-
run: node ../../packages/cli-v3/dist/esm/index.js deploy --skip-promotion --env ${{ github.event.inputs.environment || 'staging' }}
70+
run: node ../../packages/cli-v3/dist/esm/index.js deploy --skip-promotion --env ${{ matrix.environment }}

0 commit comments

Comments
 (0)