name: 🩺 Health Check - cPanel Agent on: schedule: - cron: '*/30 * * * *' # Every 30 minutes workflow_dispatch: jobs: health: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Check Plugin Status via WordPress env: WP_URL: ${{ secrets.WP_URL }} WP_APP_USER: ${{ secrets.WP_APP_USER }} WP_APP_PASSWORD: ${{ secrets.WP_APP_PASSWORD }} run: | curl -s "$WP_URL/wp-json/wp/v2/plugins" \ -u "$WP_APP_USER:$WP_APP_PASSWORD" | python3 .gitea/scripts/health-check.py - name: Check REST API Endpoints env: WP_URL: ${{ secrets.WP_URL }} run: | # Try the hermes/v1 namespace curl -s -o /dev/null -w "HTTP %{http_code}" "$WP_URL/wp-json/hermes/v1/content/generate" || echo "Endpoint check done" - name: Notify on Failure if: failure() uses: actions/gitea-release-notify@v1 with: title: "⚠️ cPanel Agent Health Check Failed" body: "The health check for hermes-cpanel-agent on ummah.falahos.my failed. Check the Gitea Actions run for details."