patch flow docs (#1625) #377
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to dev | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-dev | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_OPTIONS: "--max-old-space-size=8192" | |
| CP_WEB_URL: https://cloud.rxc.app/ | |
| CP_BACKEND_URL: https://f188e2cd-51fb-4b29-b546-2ce4b9efc5d5.fly.dev/ | |
| DEV_TYPESENSE_HOST: ${{ secrets.DEV_TYPESENSE_HOST }} | |
| DEV_TYPESENSE_SEARCH_API_KEY: ${{ secrets.DEV_TYPESENSE_SEARCH_API_KEY }} | |
| jobs: | |
| deploy: | |
| name: Deploy to Reflex Cloud | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - 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.DEV_TYPESENSE_ADMIN_API_KEY }} | |
| TYPESENSE_HOST: ${{ secrets.DEV_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 --project ${{ secrets.DEV_PROJECT_ID }} --token ${{ secrets.DEV_TOKEN }} --no-interactive | |
| - name: Check for dead links | |
| run: | | |
| # Install dependencies for dead link checker | |
| uv pip install -r scripts/requirements.txt | |
| # Wait a moment for deployment to be fully ready | |
| sleep 30 | |
| # Run dead link checker | |
| python scripts/check_dead_links.py https://pcweb-gray-orca.rxc.app --timeout 15 --delay 1 |