From 8226b952a4a02be2d6d2031071eff73cdc77b922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 5 Oct 2024 14:40:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Tweak=20Cloudflare=20action=20to?= =?UTF-8?q?=20deploy=20to=20prod=20(#398)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-ui-staging.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-ui-staging.yml b/.github/workflows/deploy-ui-staging.yml index afd2fbe0c4..fbcd9ba3f1 100644 --- a/.github/workflows/deploy-ui-staging.yml +++ b/.github/workflows/deploy-ui-staging.yml @@ -55,11 +55,12 @@ jobs: id: deploy env: PROJECT_NAME: ${{ matrix.environment == 'staging' && 'dashboard-fastapicloud-work' || matrix.environment == 'development' && 'dashboard-fastapicloud-space' }} + BRANCH: ${{ github.event_name == 'pull_request' && 'preview' || github.event_name == 'push' && 'main' }} uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy ./frontend/dist --project-name=${{ env.PROJECT_NAME }} + command: pages deploy ./frontend/dist --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }} - name: Install GitHub Actions dependencies run: | uv venv