From 7fc6b7dd52b7d09fa1caa5d37a290b5aa5801fc2 Mon Sep 17 00:00:00 2001 From: heyitsStylez Date: Wed, 6 May 2026 09:02:56 +0800 Subject: [PATCH] Defer Vercel production deploys until release tag is pushed Vercel was racing the release workflow on push-to-main and building before the tag existed, so `git describe` fell back to a short SHA in the footer and Track Wallet popup. Skip production builds on untagged main commits via ignoreCommand, and trigger Vercel via deploy hook after the release workflow tags the commit. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 12 ++++++++++++ vercel.json | 1 + 2 files changed, 13 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9a9599..0528b26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,3 +57,15 @@ jobs: git tag "$VERSION" git push origin "$VERSION" gh release create "$VERSION" --generate-notes + + - name: Trigger Vercel deploy at tagged commit + if: steps.next.outputs.version != 'skip' + env: + HOOK: ${{ secrets.VERCEL_DEPLOY_HOOK }} + run: | + if [ -z "$HOOK" ]; then + echo "VERCEL_DEPLOY_HOOK secret not set; skipping deploy trigger" >&2 + exit 0 + fi + curl -fsS -X POST "$HOOK" >/dev/null + echo "Vercel deploy hook triggered for ${{ steps.next.outputs.version }}" diff --git a/vercel.json b/vercel.json index c1d3f9c..9fc4c25 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,6 @@ { "buildCommand": "git fetch --tags --depth=1 origin || true; python3 build.py --check", + "ignoreCommand": "if [ \"$VERCEL_GIT_COMMIT_REF\" = \"main\" ]; then git fetch --tags --depth=1 origin >/dev/null 2>&1 || true; ! git describe --exact-match --tags HEAD >/dev/null 2>&1; else exit 1; fi", "outputDirectory": "public", "framework": null, "headers": [