File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : keep-warm
2+
3+ # Pings veripsa.com so the Render free-tier web service does not sleep — a slept
4+ # service cold-starts in ~10s, which is what makes the site feel slow. This repo
5+ # is public, so Actions minutes are unlimited (free). GitHub's scheduled runs can
6+ # be delayed under load, so we ping every 5 min to stay comfortably under Render's
7+ # ~15 min idle-sleep threshold. Zero secrets; just an outbound GET to a health URL.
8+
9+ on :
10+ schedule :
11+ - cron : " */5 * * * *"
12+ workflow_dispatch : {}
13+
14+ permissions :
15+ contents : read
16+
17+ jobs :
18+ ping :
19+ runs-on : ubuntu-latest
20+ timeout-minutes : 2
21+ steps :
22+ - name : Ping health endpoint
23+ run : |
24+ for attempt in 1 2 3; do
25+ code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 40 https://veripsa.com/api/healthz || echo "000")
26+ echo "attempt $attempt: HTTP $code"
27+ [ "$code" = "200" ] && exit 0
28+ sleep 10
29+ done
30+ echo "keep-warm ping did not get 200 after 3 attempts (service may be waking)"
You can’t perform that action at this time.
0 commit comments