Skip to content

Health Check

Health Check #54

Workflow file for this run

name: Health Check
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
health:
runs-on: ubuntu-latest
steps:
- name: Check health
run: |
STATUSCODE=$(curl -s -o /dev/null --write-out "%{http_code}" "${SITE_URL}")
if test $STATUSCODE -ne 200; then
exit 1
fi
curl -fsS -m 10 --retry 5 -o /dev/null "https://hc-ping.com/${HEALTH_UUID}"
env:
HEALTH_UUID: ${{ secrets.HEALTH_UUID }}
SITE_URL: ${{ secrets.SITE_URL }}