Skip to content

health check

health check #2861

Workflow file for this run

name: health check
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
ping:
runs-on: ubuntu-latest
steps:
- name: ping
run: |
echo "Pinging server..."
response=$(curl -s -o /dev/null -w "%{http_code}" ${{ secrets.API_URL }})
echo "Response code: $response"
if [ "$response" -ne 200 ]; then
echo "[ERROR] API is down"
exit 1
else
echo "[OK] API is up"
fi