Run the command like this:

This will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the dev command and don’t bypass the version checks!

It performs a few steps to deploy:

  1. Optionally updates packages when running locally.
  2. Typechecks the code.
  3. Compiles and bundles the code.
  4. Checks that environment variables are set.
  5. Deploys the code to the cloud.
  6. Registers the tasks as a new version in the environment (prod by default).

You can also setup GitHub Actions to deploy your tasks automatically.

Options

Environment
--env | -e

Defaults to prod but you can specify staging.

Skip typecheck
--skip-typecheck

Skips the pre-build typecheck step.

Skip update check
--skip-update-check

Skip checking for @trigger.dev package updates.

Build platform
--build-platform

The platform to build the deployment image for. Defaults to linux/amd64.

Log level
--log-level | -l

The log level to use (debug, info, log, warn, error, none). Defaults to log.

Set config filename
--config | -c

The name of the config file, found where the command is run from. Defaults to trigger.config.ts.

Set the projectRef
--project-ref | -p

The project ref. Required if there is no config file.

Self-hosting

These options are typically used when self-hosting or for local development.

Skip deploying the image
--skip-deploy | -D

Load the built image into your local docker.

Self-hosted (builds locally)
--self-hosted

Builds and loads the image using your local docker. Use the --registry option to specify the registry to push the image to when using --self-hosted, or just use --push to push to the default registry.

Registry
--registry

This option is coming soon. The registry to push the image to when using —self-hosted.

Push image
--push

When using the —self-hosted flag, push the image to the default registry. (defaults to false when not using —registry)

Tag the image
--tag

This option is coming soon. Specify the tag to use when pushing the image to the registry.