nope, i do not pin the version on porpouse, so i need to constantly upgrade the sdk
it is pretty much the same you provide in the docs
name: Deploy to Trigger.dev
on:
push:
branches:
- main
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm i
- name: Build
run: pnpm build
- name: ๐ Deploy Trigger.dev
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
run: |
if [ "${{ github.event.ref }}" = "refs/heads/main" ]; then
pnpm dlx trigger.dev@beta deploy --env staging --skip-typecheck
elif [ "${{ github.event.ref }}" = "refs/heads/production" ]; then
pnpm dlx trigger.dev@beta deploy --skip-typecheck
else
echo "Branch not supported for deployment"
exit 1
fi
Just with a twist so that i can deploy in staging/prod based on the branch