import ProjectPathArg from "/snippets/cli-args-project-path.mdx"; import CommonOptions from "/snippets/cli-options-common.mdx"; import ProjectRefOption from "/snippets/cli-options-project-ref.mdx"; import EnvFileOption from "/snippets/cli-options-env-file.mdx"; import ConfigFileOption from "/snippets/cli-options-config-file.mdx"; import SkipUpdateCheckOption from "/snippets/cli-options-skip-update-check.mdx"; import BranchOption from "/snippets/cli-options-branch.mdx";
Run the command like this:
npx trigger.dev@latest deploypnpm dlx trigger.dev@latest deployyarn dlx trigger.dev@latest deployIt performs a few steps to deploy:
- Optionally updates packages when running locally.
- Compiles and bundles the code.
- Deploys the code to the Trigger.dev instance.
- Registers the tasks as a new version in the environment (prod by default).
When deploying from CI/CD environments such as GitHub Actions, GitLab CI, or Jenkins, you need to authenticate non-interactively by setting the TRIGGER_ACCESS_TOKEN environment variable. Please see the CI / GitHub Actions guide for more information.
npx trigger.dev@latest deploy [path]
These options are available on most commands.
When self-hosting, builds are performed locally by default. Once you've logged in to your self-hosted instance using the CLI, you can deploy with:
npx trigger.dev@latest deployFor CI/CD environments, set TRIGGER_ACCESS_TOKEN and TRIGGER_API_URL environment variables. See the GitHub Actions guide for more details.