Coding an Action within the 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.
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. Actions support versioning natively in the Dashboard.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, GitLab Pipelines, Bitbucket Pipelines, and Microsoft Azure Pipelines.
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 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.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.
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.