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 : Health Check
2+
3+ on :
4+ schedule :
5+ - cron : ' */15 * * * *'
6+ workflow_dispatch :
7+
8+ jobs :
9+ check :
10+ name : Check endpoints
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Check frontend (apexcharts.com)
14+ run : |
15+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 https://apexcharts.com)
16+ echo "Frontend status: $STATUS"
17+ if [ "$STATUS" -lt 200 ] || [ "$STATUS" -ge 500 ]; then
18+ echo "Frontend is DOWN (HTTP $STATUS)"
19+ exit 1
20+ fi
21+
22+ - name : Check backend (/health)
23+ run : |
24+ RESPONSE=$(curl -s --max-time 10 https://api.apexcharts.com/health)
25+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 https://api.apexcharts.com/health)
26+ echo "Backend status: $STATUS"
27+ echo "Backend response: $RESPONSE"
28+ if [ "$STATUS" != "200" ]; then
29+ echo "Backend is DOWN (HTTP $STATUS)"
30+ exit 1
31+ fi
You can’t perform that action at this time.
0 commit comments