Skip to content

Deploy to production #79

Deploy to production

Deploy to production #79

Workflow file for this run

name: Deploy to production
on:
workflow_dispatch:
# This allows manual triggering of the workflow
concurrency:
group: deploy-prod
cancel-in-progress: false
permissions:
contents: read
env:
NODE_OPTIONS: "--max-old-space-size=8192"
FLY_API_TOKEN: ${{ secrets.PRD_FLY_API_TOKEN }}
TYPESENSE_HOST: ${{ secrets.PRD_TYPESENSE_HOST }}
TYPESENSE_SEARCH_API_KEY: ${{ secrets.PRD_TYPESENSE_SEARCH_API_KEY }}
jobs:
deploy:
name: Deploy to Reflex Cloud
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
activate-environment: true
- name: Install the project
run: uv sync --locked --no-dev
- name: Update Reflex CLI
run: uv pip install reflex-hosting-cli -U
- name: Index documentation to Typesense
env:
TYPESENSE_ADMIN_API_KEY: ${{ secrets.PRD_TYPESENSE_ADMIN_API_KEY }}
TYPESENSE_HOST: ${{ secrets.PRD_TYPESENSE_HOST }}
run: |
uv pip install typesense python-frontmatter markdown beautifulsoup4
python scripts/typesense_indexer.py --docs-path ./docs --blog-path ./blog --force
python scripts/synonym_indexer.py
- name: Deploy to Reflex
id: deploy
run: |
reflex deploy --token ${{ secrets.PRD_TOKEN }} --no-interactive --config cloud-prod.yml