diff --git a/.github/workflows/deploy-website-index.yml b/.github/workflows/deploy-website-index.yml index c17c5627..768d76ec 100644 --- a/.github/workflows/deploy-website-index.yml +++ b/.github/workflows/deploy-website-index.yml @@ -22,8 +22,12 @@ jobs: env: PROJECT_NAME: random-user-agent-index DIST_DIR: ./website/index - ENVIRONMENT: prod # dev|staging|prod + CF_BRANCH_NAME: main # to deploy as "Production" environment on Cloudflare Pages with: apiToken: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy ${{ env.DIST_DIR }} --project-name=${{ env.PROJECT_NAME }} --env ${{ env.ENVIRONMENT }} --commit-dirty=true + command: + pages deploy ${{ env.DIST_DIR }} + --project-name=${{ env.PROJECT_NAME }} + --branch ${{ env.CF_BRANCH_NAME }} + --commit-dirty=true diff --git a/.github/workflows/deploy-website-sandbox.yml b/.github/workflows/deploy-website-sandbox.yml index 5a620a3b..8277d8a6 100644 --- a/.github/workflows/deploy-website-sandbox.yml +++ b/.github/workflows/deploy-website-sandbox.yml @@ -22,8 +22,12 @@ jobs: env: PROJECT_NAME: random-user-agent-ua-test-sandbox DIST_DIR: ./website/sandbox - ENVIRONMENT: prod # dev|staging|prod + CF_BRANCH_NAME: main # to deploy as "Production" environment on Cloudflare Pages with: apiToken: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy ${{ env.DIST_DIR }} --project-name=${{ env.PROJECT_NAME }} --env ${{ env.ENVIRONMENT }} --commit-dirty=true + command: + pages deploy ${{ env.DIST_DIR }} + --project-name=${{ env.PROJECT_NAME }} + --branch ${{ env.CF_BRANCH_NAME }} + --commit-dirty=true