mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-21 13:20:33 +08:00
fix(telemetry): report instance after deployment (#417)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user