feat: add GitHub Action for daily health check cron and backfill script

- Create .github/workflows/health-check.yml to run daily at 2am UTC
- Add scripts/backfill-health-checks.ts to populate health data for existing tools
- Remove health-check from vercel.json crons (now using GitHub Actions)

The GitHub Action workflow follows the same pattern as other sync operations
and calls the /api/sync/health-check endpoint with proper authentication.

The backfill script:
- Fetches all tools from database
- Runs batch health checks with concurrency control (5 tools at a time)
- Shows detailed progress and summary statistics
- Lists broken tools with error details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-04 16:36:55 +10:00
parent 64a05482e4
commit 958697f788
3 changed files with 151 additions and 4 deletions

18
.github/workflows/health-check.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Daily Health Check
on:
schedule:
# Run daily at 2am UTC
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
health-check:
runs-on: ubuntu-latest
steps:
- name: Trigger health check sync
run: |
curl -X POST "${{ secrets.VERCEL_PRODUCTION_URL }}/api/sync/health-check" \
-H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" \
-H "Content-Type: application/json" \
-f -s -S -w "\nHTTP Status: %{http_code}\n"