diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 437d775ca9..be95b63576 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -12,11 +12,10 @@ concurrency: env: CP_WEB_URL: https://cloud.rxc.app/ CP_BACKEND_URL: https://cloud-f188e2cd-51fb-4b29-b546-2ce4b9efc5d5.fly.dev/ - PROMETHEUS_MULTIPROC_DIR: /tmp/prometheus_multiproc_dir jobs: deploy: - name: Deploy to Reflex and Fly.io + name: Deploy to Reflex Cloud runs-on: ubuntu-latest steps: - name: Checkout code @@ -30,10 +29,6 @@ jobs: - name: Install Requirements run: pip install -r requirements.txt - - name: Update Reflex - run: pip install reflex -U - - # temporary fix until reflex-cli is published to pypi - name: Update Reflex CLI run: pip install reflex-hosting-cli -U diff --git a/.github/workflows/deploy-prd.yml b/.github/workflows/deploy-prd.yml new file mode 100644 index 0000000000..81f2fae32d --- /dev/null +++ b/.github/workflows/deploy-prd.yml @@ -0,0 +1,37 @@ +name: Deploy to production + +on: + workflow_dispatch: + # This allows manual triggering of the workflow + + +concurrency: + group: deploy-prod + cancel-in-progress: false + +env: + FLY_API_TOKEN: ${{ secrets.PRD_FLY_API_TOKEN }} + +jobs: + deploy: + name: Deploy to Reflex Cloud + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install Requirements + run: pip install -r requirements.txt + + - name: Update Reflex CLI + run: pip install reflex-hosting-cli -U + + - name: Deploy to Reflex + id: deploy + run: | + reflex deploy --project ${{ secrets.PRD_PROJECT_ID }} --token ${{ secrets.PRD_TOKEN }} --no-interactive diff --git a/.github/workflows/deploy-stg.yml b/.github/workflows/deploy-stg.yml new file mode 100644 index 0000000000..96dd75a247 --- /dev/null +++ b/.github/workflows/deploy-stg.yml @@ -0,0 +1,39 @@ +name: Deploy to staging + +# on: +# push: +# branches: +# - 'r/*' + +concurrency: + group: deploy-staging + cancel-in-progress: false + +env: + FLY_API_TOKEN: ${{ secrets.STG_FLY_API_TOKEN }} + CP_WEB_URL: https://cloud.reflexcorp.run/ + CP_BACKEND_URL: https://cloud-29f4f535-4fb8-48b9-8b55-2000f2782aee.fly.dev/ + +jobs: + deploy: + name: Deploy to Reflex Cloud + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install Requirements + run: pip install -r requirements.txt + + - name: Update Reflex CLI + run: pip install reflex-hosting-cli -U + + - name: Deploy to Reflex + id: deploy + run: | + reflex deploy --project ${{ secrets.STG_PROJECT_ID }} --token ${{ secrets.STG_TOKEN }} --no-interactive