Can't deploy using Github Actions on Turborepo
Describe the bug
Can't deploy with Github Actions
Reproduction repo
_
To reproduce
use the Github Action provided by the docs
Additional information
It's a turbo repo
Hi there! I understand you're having trouble deploying using Github Actions with trigger.dev in your Turborepo setup. Let me help you resolve this issue.
Looking at the error and the latest documentation, there are a few things we need to address:
- First, make sure you're following the latest deployment guidelines for Github Actions. You'll need a proper workflow file that looks something like this:
name: Deploy Trigger.dev
on:
push:
branches: [main]
paths:
- 'trigger/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Deploy Trigger.dev
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
run: npx trigger.dev@latest deploy
-
Since you're running into an issue with esbuild-decorators, you should:
- Add esbuild-decorators to your dependencies if not already present
- Configure it properly in your build setup
-
For better version management, I recommend adding the deploy command to your package.json:
{
"scripts": {
"deploy:trigger": "npx trigger.dev@latest deploy",
"deploy:trigger:staging": "npx trigger.dev@latest deploy --env staging"
}
}
This way, your Github Actions workflow will use the version specified in your package.json.
The error you're seeing with esbuild-decorators suggests there might be a compatibility issue with the beta version you're using. I recommend:
- Upgrading to the latest stable version of trigger.dev
- Ensuring all your dependencies are properly installed before deployment
- Adding a build step before deployment if needed
If you continue to experience issues, please share your complete:
- trigger.config.ts file
- Github Actions workflow file
- package.json dependencies
This will help us provide more specific guidance for your setup.
References:
Let me know if you need any clarification or run into other issues!