Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions main/docs/deploy-monitor/deployment-best-practices.mdx
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
---
description: Learn about best practices for deployment.
title: Deployment Best Practices
validatedOn: 2026-02-05
---
## Use automated deployment for rules
## Use automated deployment for Actions

Coding a rule within the <Tooltip tip="Auth0 Dashboard: Auth0's main product to configure your services." cta="View Glossary" href="/docs/glossary?term=Auth0+Dashboard">Auth0 Dashboard</Tooltip> rule editor is a great way to implement and test while still in the development stage. However, when it comes time to deploy into automated test or production environments, a more automated mechanism is required; copying and pasting code between Auth0 tenants is not a satisfactory method to employ.
Coding an Action within the <Tooltip tip="Auth0 Dashboard: Auth0's main product to configure your services." cta="View Glossary" href="/docs/glossary?term=Auth0+Dashboard">Auth0 Dashboard</Tooltip> editor is a great way to implement and test while still in the development stage. However, when it comes time to deploy into automated test or production environments, a more automated mechanism is required; copying and pasting code between Auth0 tenants is not a satisfactory method.

### Set up version control extensions
### Set up version control for Actions

Changes made to a rule deployed to an Auth0 tenant will be made live immediately because changes instantly overwrite what is already there. We recommended that you use version control such as Git via GitHub or the like, is employed to provide change management capability.
Changes made to an Action in the Auth0 Dashboard are saved as drafts until they are deployed. After deploying, a version is created, but you must attach the Action to a trigger for it to activate. We recommend using version control to provide change management and code review capabilities. Unlike Rules, Actions support versioning natively in the Dashboard.

Auth0 provides automated deployment methods for rules between Auth0 tenant environments. The following Auth0 integrations allow you to update rules from the version control system—both manually and automatically (for example, when a change in the version control system is detected): [GitHub Actions](https://marketplace.auth0.com/integrations/github-actions), [GitLab Pipelines](https://marketplace.auth0.com/integrations/gitlab-pipeline), [Bitbucket Pipelines](https://marketplace.auth0.com/integrations/bitbucket-pipeline), and [Microsoft Azure Pipelines](https://marketplace.auth0.com/integrations/azure-pipeline).
Auth0 provides automated deployment methods for Actions between Auth0 tenant environments. The following Auth0 integrations allow you to update Actions from the version control system—both manually and automatically (for example, when a change in the version control system is detected): [GitHub Actions](https://marketplace.auth0.com/integrations/github-actions), [GitLab Pipelines](https://marketplace.auth0.com/integrations/gitlab-pipeline), [Bitbucket Pipelines](https://marketplace.auth0.com/integrations/bitbucket-pipeline), and [Microsoft Azure Pipelines](https://marketplace.auth0.com/integrations/azure-pipeline).

### Use Deploy CLI tool for rule import and export
### Use Deploy CLI tool for Action import and export

The Auth0 Deploy CLI tool can be used to automate deployment between Auth0 tenants. Deploy CLI works with files stored in the file system together with the Auth0 <Tooltip tip="Management API: A product to allow customers to perform administrative tasks." cta="View Glossary" href="/docs/glossary?term=Management+API">Management API</Tooltip> and provides the capability to allow the export of rule assets from an Auth0 tenant, as well as import of them into an Auth0 tenant. Further, the tool provides for programmatic control over rule ordering and rule environment configuration as part of deployment automation. To learn more, read [Deploy CLI Tool](/docs/deploy-monitor/deploy-cli-tool).
The Auth0 Deploy CLI tool automates the deployment of Actions between Auth0 tenants. It works with local YAML or directory-based files together with the Auth0 <Tooltip tip="Management API: A product to allow customers to perform administrative tasks." cta="View Glossary" href="/docs/glossary?term=Management+API">Management API</Tooltip> and provides the capability to allow the export of Actions from an Auth0 tenant, as well as import of them into an Auth0 tenant. Further, the tool provides programmatic control over the ordering and environment configuration of an Action as part of deployment automation. To learn more, read [Deploy CLI Tool](/docs/deploy-monitor/deploy-cli-tool).

As a best practice, you should use the Auth Deploy CLI tool in almost all cases involving deployment to test or production environments, such as with the following integrations: [GitLab Pipelines](https://marketplace.auth0.com/integrations/gitlab-pipeline), [GitHub Actions](https://marketplace.auth0.com/integrations/github-actions), [Bitbucket Pipelines](https://marketplace.auth0.com/integrations/bitbucket-pipeline), and [Microsoft Azure Pipelines](https://marketplace.auth0.com/integrations/azure-pipeline). While the integrations can provide automated detection of changes deployed to the respective version control system, the Deploy CLI tool allows precise control of what’s deployed when, where, and how.
As a best practice, use the Auth0 Deploy CLI in almost all cases involving deployment to test or production environments. While Marketplace integrations provide automated detection of changes, the Deploy CLI allows precise control over what is deployed, when, and how.

## Set up test tenants

We recommend that you set up a separate test tenant in Auth0 to provide safe testing of any rules before deploying to production. To learn more, read [Set Up Multiple Environments](/docs/get-started/auth0-overview/create-tenants/set-up-multiple-environments).
We recommend that you set up a separate test tenant in Auth0 to provide safe testing of any Actions before deploying to production. To learn more, read [Set Up Multiple Environments](/docs/get-started/auth0-overview/create-tenants/set-up-multiple-environments).

## Migrate Rules to Actions

If you have existing Rules, you should migrate them to Actions using the Rules Migration Tool located in the Auth0 Dashboard. To learn more, read [Migrate from Rules to Actions](docs/customize/actions/migrate/migrate-from-rules-to-actions).