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"
