Skip to main content
The instructions below are specific to GitHub Actions, but the same concepts can be used with other CI systems.
Check out our new GitHub integration for automatic deployments, without adding any GitHub Actions workflows.

GitHub Actions example

This simple GitHub action workflow will deploy your Trigger.dev tasks when new code is pushed to the main branch and the trigger directory has changes in it.
The deploy step will fail if any version mismatches are detected. Please see the version pinning section for more details.
name: Deploy to Trigger.dev (prod)

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Use Node.js 20.x
        uses: actions/setup-node@v4
        with:
          node-version: "20.x"

      - name: Install dependencies
        run: npm install

      - name: 🚀 Deploy Trigger.dev
        env:
          TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
        run: |
          npx trigger.dev@latest deploy
If you already have a GitHub action file, you can just add the final step ”🚀 Deploy Trigger.dev” to your existing file.

Creating a Personal Access Token

1

Create a new access token

Go to your profile page and click on the “Personal Access Tokens” tab.
2

Go to your repository on GitHub.

Click on ‘Settings’ -> ‘Secrets and variables’ -> ‘Actions’ -> ‘New repository secret’
3

Add the TRIGGER_ACCESS_TOKEN

Add the name TRIGGER_ACCESS_TOKEN and the value of your access token.