Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,35 @@ jobs:

gh issue create --title "$TITLE" --body "$BODY" --label "bug,groundskeeper-autofix"

# Deploy job removed — production deploys are now handled by the scheduled
# deploy hook (scheduled-deploy.yml, every hour) instead of per-push.
# This caps Vercel build minutes at 24/day max vs 50-80/day previously.
# vercel.json sets github.enabled=false to prevent Vercel from posting
# PR failure statuses (deploy hooks bypass the GitHub integration).
deploy:
# Trigger Vercel production deployment after CI passes on the production branch.
# Vercel GitHub integration is disabled (vercel.json github.enabled=false) to
# prevent PR failure statuses — deploy hooks bypass the GitHub integration.
# The VERCEL_DEPLOY_HOOK_URL secret must be a hook configured for the "production" branch.
needs: [ci]
if: github.ref == 'refs/heads/production' && github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Trigger Vercel production deployment
run: |
if [ -z "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}" ]; then
echo "::error::VERCEL_DEPLOY_HOOK_URL secret is not set."
echo "Go to Vercel Dashboard → Project → Settings → Git → Deploy Hooks"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move some of this to TS? This seems error prone

echo "Create a hook for Branch 'production', then add the URL as a GitHub secret."
exit 1
fi

RESPONSE=$(curl -s -o /tmp/vercel_response.json -w "%{http_code}" \
-X POST "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}")

echo "HTTP status: $RESPONSE"
cat /tmp/vercel_response.json

if [ "$RESPONSE" -ge 200 ] && [ "$RESPONSE" -lt 300 ]; then
echo "Production deployment triggered."
else
echo "::error::Vercel deploy hook returned HTTP $RESPONSE"
exit 1
fi
71 changes: 0 additions & 71 deletions .github/workflows/scheduled-deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"framework": "nextjs",
"installCommand": "cd .. && npx pnpm@9 install",
"buildCommand": "node scripts/build-data.mjs && next build",
"_ignoreCommandNote": "Vercel ignoreCommand uses INVERTED exit codes: exit 1 = BUILD (do not skip), exit 0 = SKIP. This is the opposite of Unix convention. The command below builds only the 'production' branch.",
"_ignoreCommandNote": "Vercel ignoreCommand uses INVERTED exit codes: exit 1 = BUILD (do not skip), exit 0 = SKIP. This is the opposite of Unix convention. The command below builds only the 'production' branch. Deploy hook in ci.yml is configured for Branch 'production' so this always passes.",
"ignoreCommand": "bash -c '# Vercel exit code convention: exit 1=BUILD (do not skip), exit 0=SKIP (ignore). Opposite of normal Unix convention.\n[[ $VERCEL_GIT_COMMIT_REF == production ]] && exit 1; exit 0'",
"github": {
"enabled": false
Expand Down