You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix package manager detection
* fix cli update check while in beta
* add update command and warn on mismatches
* update fixes and better integration with dev and deploy
* fix for ci
* update docs
* changeset
* be more specific about prompts before updates
* fail on version mismatch during ci
* update github actions docs
* fix package manager copypasta
* remove ncu
* ignore companyicons
* improve warnings and errors
Copy file name to clipboardExpand all lines: docs/_snippets/v3/step-cli-dev.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
The CLI `dev` command runs a server for your tasks. It will watches for changes in your `/trigger` directory and communicates with the Trigger.dev platform to register your tasks, perform runs, and send data back and forth.
4
4
5
+
It can also update your `@trigger.dev/*` packages to prevent version mismatches and failed deploys. You will always be prompted first.
<Warning>Will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the [dev](/v3/cli-dev) command and don't bypass the version checks!</Warning>
25
+
24
26
It performs a few steps to deploy:
25
27
26
-
1. Typechecks the code.
27
-
2. Compiles and bundles the code.
28
-
3. Checks that [environment variables](/v3/deploy-environment-variables) are set.
29
-
4. Deploys the code to the cloud.
30
-
5. Registers the tasks as a new version in the environment (prod by default).
28
+
1. Optionally updates packages when running locally.
29
+
2. Typechecks the code.
30
+
3. Compiles and bundles the code.
31
+
4. Checks that [environment variables](/v3/deploy-environment-variables) are set.
32
+
5. Deploys the code to the cloud.
33
+
6. Registers the tasks as a new version in the environment (prod by default).
Copy file name to clipboardExpand all lines: docs/v3/cli-dev.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ yarn dlx trigger.dev@beta dev
21
21
22
22
</CodeGroup>
23
23
24
+
It will first perform an update check to prevent version mismatches, failed deploys, and other errors. You will always be prompted first.
25
+
24
26
You will see in the terminal that the server is running and listening for requests. When you run a task, you will see it in the terminal along with a link to view it in the dashboard.
25
27
26
28
It is worth noting that each task runs in a separate Node process. This means that if you have a long-running task, it will not block other tasks from running.
Copy file name to clipboardExpand all lines: docs/v3/github-actions.mdx
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ description: "You can easily deploy your tasks with GitHub actions."
5
5
6
6
This simple GitHub action file will deploy you Trigger.dev tasks when new code is pushed to the `main` branch and the `trigger` directory has changes in it.
7
7
8
+
<Warning>The deploy step will fail if any version mismatches are detected. Please see the [version pinning](/v3/github-actions#version-pinning) section for more details.</Warning>
9
+
8
10
```yaml .github/workflows/release-trigger.yml
9
11
name: Deploy to Trigger.dev
10
12
@@ -42,3 +44,19 @@ If you already have a GitHub action file, you can just add the final step "🚀
42
44
You need to add the `TRIGGER_ACCESS_TOKEN` secret to your repository. You can create a new access token by going to your profile page and then clicking on the "Personal Access Tokens" tab.
43
45
44
46
To set it in GitHub go to your repository, click on "Settings", "Secrets and variables" and then "Actions". Add a new secret with the name `TRIGGER_ACCESS_TOKEN` and use the value of your access token.
47
+
48
+
## Version pinning
49
+
50
+
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.
51
+
52
+
To ensure a smooth CI experience you can pin the CLI version in the deploy step, like so:
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