fix(telemetry): report instance after deployment (#417)

This commit is contained in:
Jasper Van
2026-06-08 12:40:59 -04:00
committed by GitHub
parent 1d7ac9b071
commit bd9f047ebb
9 changed files with 218 additions and 36 deletions
+9 -20
View File
@@ -140,26 +140,6 @@ jobs:
- name: Patch wrangler.toml with D1 database ID
run: sed -i "s/database_id = \"[^\"]*\"/database_id = \"${{ steps.d1.outputs.id }}\"/" wrangler.toml
- name: Apply D1 migrations
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler d1 migrations apply DB --remote
- name: Build
run: pnpm exec vite build
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# Run wrangler from the repo root so it uses the @cloudflare/vite-plugin's
# redirect config (.wrangler/deploy/config.json) which points at the
# built Worker (dist/zpan/wrangler.json). Cd'ing into dist/zpan instead
# causes wrangler 4.x to error on conflicting base paths between the
# two configs.
run: pnpm exec wrangler deploy
- name: Set BETTER_AUTH_SECRET (first deploy only)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
@@ -184,3 +164,12 @@ jobs:
run: |
echo "${{ steps.r2.outputs.url }}" | pnpm exec wrangler secret put PUBLIC_IMAGES_URL
echo "Set PUBLIC_IMAGES_URL = ${{ steps.r2.outputs.url }}"
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
ZPAN_DEPLOY_URL: ${{ vars.ZPAN_DEPLOY_URL }}
# Keep post-deploy hooks inside the repository deploy command so
# GitHub Actions and Cloudflare Workers Builds can share the same path.
run: pnpm deploy