feat(ci): add scheduled site reachability health check #2
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-static-sites!2
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/site-health-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope
Adds one new workflow file,
.forgejo/workflows/site-health-check.yml. Doesnot touch
build-deploy.ymlorpr-policy-check.yml.An org-wide CI-coverage audit found that
build-deploy.ymldeploys on everypush to
masterbut there's no scheduled check that the deployed domains areactually still reachable in between deploys. This closes that gap with a
read-only reachability check, mirroring
Toilville/toilville_rituals's.forgejo/workflows/healthcheck.ymlcurl-basedcheck()pattern.What it checks
The four domains this repo builds for (from
sites/*/site.json, matching thebuild-deploy.ymlmatrix):https://peterswimm.comhttps://pulsewave.riphttps://toilville.devhttps://truechiptilldeath.comRuns on a daily schedule (
10 10 * * *, an off-peak UTC slot) plusworkflow_dispatchfor manual runs.runs-on/containermatch thereference workflow's
[self-hosted, linux, x64]+alpine/curl:latest.No Mailgun/alerting integration —
fj actions secrets listreturned norepo-level secrets for this repo, so I couldn't confirm
MAILGUN_*secretsare provisioned here the way they are for the reference repo's healthcheck.
Per the org's simpler-checks convention, a failing/red scheduled run is the
signal; someone can layer alerting on later once secrets are confirmed.
Important caveat, worth a human look before merge:
build-deploy.yml'sown header comment says it only ever rsyncs build output to a staging path
on toilville-forge — nginx cutover to actually serve traffic from that path
is a separate, manual, per-domain step. So depending on where each domain
currently stands in that migration, this check may currently be validating
the pre-existing (e.g. WordPress) origin rather than this repo's static
build output. That's still a legitimate reachability check worth having, but
it isn't "did the last deploy go live" — I called this out in the workflow's
own header comment too so it doesn't get misread later.
Testing
python3 -c "import yaml; yaml.safe_load(...)"(parses cleanly) and with
yamllint— the only findings are the samedefault-style warnings (80-char line length, missing
---doc start,on:truthy-key warning) thatyamllintalso raises against the existinghealthcheck.ymland this repo's ownbuild-deploy.yml, so nothing new.the expected status codes:
toilville.devreturned200. The otherthree (
peterswimm.com,pulsewave.rip,truechiptilldeath.com)currently returned
403from Cloudflare with body "Your request wasblocked" — this reads like Cloudflare Bot Fight Mode/WAF flagging a
non-browser client rather than an actual outage (the reference
healthcheck.ymluses the same UA successfully againsttoilville.com,which sits on a less strict zone). I don't have a way to trigger the
actual self-hosted runner pre-merge to confirm whether its egress gets
the same treatment.
build/deploy path itself.
Impact Statement
modified.
integration added (see caveat above).
Needs human action before/after merge: please manually trigger
workflow_dispatchonce merged and confirm the self-hosted runner doesn'thit the same Cloudflare block I saw testing externally on
peterswimm.com/pulsewave.rip/truechiptilldeath.com. If it does, thisjob will run red every night for reasons unrelated to actual site health,
and the fix is on the Cloudflare side (allowlist the runner's egress
IP/UA for those three zones), not in this workflow.