Run the command like this: ```bash npm npx trigger.dev@latest deploy ``` ```bash pnpm pnpm dlx trigger.dev@latest deploy ``` ```bash yarn yarn dlx trigger.dev@latest deploy ``` This will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the [dev](/cli-dev) command and don't bypass the version checks! It performs a few steps to deploy: 1. Optionally updates packages when running locally. 2. Compiles and bundles the code. 3. Deploys the code to the Trigger.dev instance. 4. Registers the tasks as a new version in the environment (prod by default). You can also setup [GitHub Actions](/github-actions) to deploy your tasks automatically. ## Options Defaults to `prod` but you can specify `staging`. The name of the config file, found where the command is run from. Defaults to `trigger.config.ts`. Load environment variables from a file. This will only hydrate the `process.env` of the CLI process, not the tasks. Create a deployable build but don't deploy it. Prints out the build path so you can inspect it. Skip checking for `@trigger.dev` package updates. The project ref. Required if there is no config file. The log level to use (debug, info, log, warn, error, none). Defaults to `log`. Turn off syncing environment variables with the Trigger.dev instance. ## Self-hosting These options are typically used when [self-hosting](/open-source-self-hosting) or for local development. Load the built image into your local docker. 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. Loads the image into your local docker after building it. Specify the registry to push the image to when using `--self-hosted`. When using the --self-hosted flag, push the image to the registry. The namespace to use when pushing the image to the registry. For example, if pushing to Docker Hub, the namespace is your Docker Hub username. ### Push to Docker Hub An example of deploying to Docker Hub when using a self-hosted setup: ```bash npx trigger.dev@latest deploy \ --self-hosted \ --load-image \ --push \ --registry docker.io \ --namespace mydockerhubusername ```