name: 🏥 Infrastructure Health Monitoring on: schedule: - cron: '*/15 * * * *' workflow_dispatch: jobs: health-check: name: 🔍 Health Check runs-on: ubuntu-latest steps: - name: 🚂 Railway id: railway continue-on-error: true run: | if [ -n "${{ secrets.RAILWAY_HEALTH_URL }}" ]; then STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ secrets.RAILWAY_HEALTH_URL }}") [ "$STATUS" -eq 200 ] && echo "status=healthy" >> $GITHUB_OUTPUT || echo "status=unhealthy" >> $GITHUB_OUTPUT else echo "status=skipped" >> $GITHUB_OUTPUT fi - name: ☁️ Cloudflare id: cloudflare continue-on-error: true run: | if [ -n "${{ secrets.CLOUDFLARE_HEALTH_URL }}" ]; then STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ secrets.CLOUDFLARE_HEALTH_URL }}") [ "$STATUS" -eq 200 ] && echo "status=healthy" >> $GITHUB_OUTPUT || echo "status=unhealthy" >> $GITHUB_OUTPUT else echo "status=skipped" >> $GITHUB_OUTPUT fi - name: ▲ Vercel id: vercel continue-on-error: true run: | if [ -n "${{ secrets.VERCEL_HEALTH_URL }}" ]; then STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ secrets.VERCEL_HEALTH_URL }}") [ "$STATUS" -eq 200 ] && echo "status=healthy" >> $GITHUB_OUTPUT || echo "status=unhealthy" >> $GITHUB_OUTPUT else echo "status=skipped" >> $GITHUB_OUTPUT fi - name: 📊 Report run: | echo "### 🏥 Infrastructure Health Report" >> $GITHUB_STEP_SUMMARY echo "| Platform | Status | Time |" >> $GITHUB_STEP_SUMMARY echo "|----------|--------|------|" >> $GITHUB_STEP_SUMMARY echo "| Railway | ${{ steps.railway.outputs.status == 'healthy' && '✅' || steps.railway.outputs.status == 'skipped' && '⏭️' || '❌' }} | $(date -u '+%H:%M UTC') |" >> $GITHUB_STEP_SUMMARY echo "| Cloudflare | ${{ steps.cloudflare.outputs.status == 'healthy' && '✅' || steps.cloudflare.outputs.status == 'skipped' && '⏭️' || '❌' }} | $(date -u '+%H:%M UTC') |" >> $GITHUB_STEP_SUMMARY echo "| Vercel | ${{ steps.vercel.outputs.status == 'healthy' && '✅' || steps.vercel.outputs.status == 'skipped' && '⏭️' || '❌' }} | $(date -u '+%H:%M UTC') |" >> $GITHUB_STEP_SUMMARY