This is a sample repository which shows how you can use GitHub & GitHub Actions as an "Infrastructure as Code" solution for Auth0. A full description of how this works can be found on my blog.
To perform an export you'll run the following command:
DEV_AUTH0_CLIENT_SECRET=... npm run export:dev
Note that you'll need to update the /config/dev.json file with your Auth0 account details and the Client ID of the client you created for the Deploy CLI. The Client Secret then needs to be provided as an environment variable in the command above.
In this example each push to main
or staging
will result in a workflow being executed which will deploy the changes to your Auth0 account. The settings for these workflows can also be found in the /config folder.
The Client Secrets need to be registered as Repository Secrets in your repository with the following names:
PROD_AUTH0_CLIENT_SECRET
STAGING_AUTH0_CLIENT_SECRET