buster/.github/workflows/trigger-deployment.yml

39 lines
1.1 KiB
YAML

name: Deploy Trigger.dev Tasks
on:
push:
branches: [main, staging]
# Only one deployment per environment at a time
concurrency:
group: trigger-deploy-${{ github.ref }}
cancel-in-progress: false # Never cancel deployments
jobs:
deploy:
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: ${{ github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9.15.0
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: 🚀 Deploy to ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
run: |
cd apps/trigger
pnpm dlx trigger.dev@latest deploy --env ${{ github.ref_name == 'main' && 'production' || 'staging' }}