name: Sentinel Patrol

on:
  schedule:
    - cron: '0 */6 * * *'  # patrol every 6 hours
  workflow_dispatch:       # support manual trigger

jobs:
  patrol:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Run Sentinel Patrol
        run: |
          echo "🔍 Running sentinel patrol..."
          # Integrate actual sentinel check scripts here
          npm run test:e2e:smoke || true
        env:
          APP_URL: ${{ secrets.APP_URL }}
