Skip to content

Commit 782d4f7

Browse files
authored
Added tip for setting up github actions using npm run to simplify version pinning (#1132)
* added arg to install puppeteer deps to base image * added tip on deploy setup * removed docker changes
1 parent b6de469 commit 782d4f7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/v3/github-actions.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,24 @@ To set it in GitHub go to your repository, click on "Settings", "Secrets and var
9595
## Version pinning
9696

9797
The CLI and `@trigger.dev/*` package versions need to be in sync, otherwise there will be errors and unpredictable behavior. Hence, the `deploy` command will automatically fail during CI on any version mismatches.
98-
99-
To ensure a smooth CI experience you can pin the CLI version in the deploy step, like so:
98+
Tip: add the deploy command to your `package.json` file to keep versions managed in the same place. For example:
99+
100+
```json
101+
{
102+
"scripts": {
103+
"deploy:trigger-prod": "npx [email protected] deploy",
104+
"deploy:trigger": "npx [email protected] deploy --env staging"
105+
}
106+
}
107+
```
108+
Your workflow file will follow the version specified in the `package.json` script, like so:
100109

101110
```yaml .github/workflows/release-trigger.yml
102111
- name: 🚀 Deploy Trigger.dev
103112
env:
104113
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
105114
run: |
106-
npx [email protected] deploy
115+
npm run deploy:trigger
107116
```
108117

109118
You should use the version you run locally during dev and manual deploy. The current version is displayed in the banner, but you can also check it by appending `--version` to any command.

0 commit comments

Comments
 (0)