From 240421d3cb5cbbf525223c3fd3ff95c12a6c27b0 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Fri, 11 Sep 2026 23:53:45 -0400 Subject: [PATCH] fix: deploy preview versions to apply observability settings --- .github/workflows/deploy-workers.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-workers.yml b/.github/workflows/deploy-workers.yml index 57932fcc5..4968dfcfa 100644 --- a/.github/workflows/deploy-workers.yml +++ b/.github/workflows/deploy-workers.yml @@ -78,4 +78,13 @@ jobs: accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} gitHubToken: ${{ github.token }} environment: ${{ vars.CLOUDFLARE_ENV }} - command: ${{ github.ref == 'refs/heads/dev' && 'deploy --no-x-provision' || format('versions upload --preview-alias {0}', steps.ref.outputs.ref_name) }} + command: ${{ github.ref == 'refs/heads/dev' && 'deploy --no-x-provision' || format('versions upload --preview-alias {0} --tag {1}-{2}', steps.ref.outputs.ref_name, github.run_id, github.run_attempt) }} + + # Preview uploads do not apply tail consumers or observability settings. + - name: Deploy Preview Version + if: github.ref != 'refs/heads/dev' + run: pnpm exec wrangler versions deploy --version-tag "$VERSION_TAG@100%" --env "$CLOUDFLARE_ENV" --yes --no-x-provision + env: + VERSION_TAG: ${{ github.run_id }}-${{ github.run_attempt }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}