Skip to content

keep-warm

keep-warm #164

Workflow file for this run

name: keep-warm
# Pings veripsa.com so the Render free-tier web service does not sleep — a slept
# service cold-starts in ~10s, which is what makes the site feel slow. This repo
# is public, so Actions minutes are unlimited (free). GitHub's scheduled runs can
# be delayed under load, so we ping every 5 min to stay comfortably under Render's
# ~15 min idle-sleep threshold. Zero secrets; just an outbound GET to a health URL.
on:
schedule:
- cron: "*/5 * * * *"
workflow_dispatch: {}
permissions:
contents: read
jobs:
ping:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Ping health endpoint
run: |
for attempt in 1 2 3; do
code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 40 https://veripsa.com/api/healthz || echo "000")
echo "attempt $attempt: HTTP $code"
[ "$code" = "200" ] && exit 0
sleep 10
done
echo "keep-warm ping did not get 200 after 3 attempts (service may be waking)"