For AI agents: the complete documentation index is at llms.txt. Remove the trailing slash from a page URL and append .md to read its Markdown version. For the docs home, use index.md.

Deploy with GitHub Actions

Use the Reflex deploy action to deploy an app to Reflex Cloud from a GitHub Actions workflow.

This action requires reflex>=0.6.6

Usage

Add the Action to Your Workflow

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

name: Deploy Reflex App

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to Reflex Cloud
        uses: reflex-dev/reflex-deploy-action@v1
        with:
          auth_token: ${{ secrets.REFLEX_AUTH_TOKEN }}
          project_id: ${{ secrets.REFLEX_PROJECT_ID }}
          app_directory: "my-app-folder" # Optional, defaults to root
          extra_args: "--region sjc" # Optional
          python_version: "3.12" # Optional

Set Up Your Secrets

Store the Reflex authentication token and project ID as GitHub repository secrets:

  1. Go to your GitHub repository.
  2. Open Settings > Secrets and variables > Actions.
  3. From the organization's Tokens page, create a token from the Deploy template and limit it to the target project. Store it as REFLEX_AUTH_TOKEN. See Tokens.
  4. Create REFLEX_PROJECT_ID with the project ID copied from the project's settings in Reflex Build.

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.12