Reflex Cloud - Fast, secure & scalable hosting. One command to deploy.

Reflex Deploy with Github Actions

This GitHub Action simplifies the deployment of Reflex applications to Reflex Cloud. It handles setting up the environment, installing the Reflex CLI, and deploying your app with minimal configuration.

This action requires reflex>=0.6.6

Features:

  • Deploy Reflex apps directly from your GitHub repository to Reflex Cloud.
  • Supports subdirectory-based app structures.
  • Securely uses authentication tokens via GitHub Secrets.

Usage

Add the Action to Your Workflow

Create a .github/workflows/deploy.yml file in your repository and add the following:

Set Up Your Secrets

Store your Reflex authentication token securely in your repository's secrets:

  1. Go to your GitHub repository.
  2. Navigate to Settings > Secrets and variables > Actions > New repository secret.
  3. Create new secrets for REFLEX_AUTH_TOKEN and REFLEX_PROJECT_ID.

(Create a REFLEX_AUTH_TOKEN in the tokens tab of your UI, check out these docs.

The REFLEX_PROJECT_ID can be found in the UI when you click on the How to deploy button on the top right when inside a project and copy the ID after the --project flag.)

Inputs

NameDescriptionrequiredDefault
auth_tokenReflex authentication token stored in GitHub Secrets.trueN/A
project_idThe ID of the project you want to deploy to.trueN/A
app_directoryThe directory containing your Reflex app.false. (root)
extra_argsAdditional arguments to pass to the `reflex deploy` command.falseN/A
python_versionThe Python version to use for the deployment environment.false3.9