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": [