14a32bdc0d
- Unified monorepo with backend (Express), frontend (Next.js), and devops - Backend: ESLint, Prettier, Jest tests (3 passing), health endpoint, .env.example - Frontend: Fixed build errors, fixed all lint errors (0 remaining), tests passing - DevOps: Docker Compose with PostgreSQL, backend, frontend + healthchecks - CI/CD: 3 GitHub Actions workflows (backend, frontend, docker integration) - DX: Husky pre-commit hooks with smart change detection - Docs: Root README with architecture, CONTRIBUTING.md, PR template Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Lighthouse Scan Cron Job
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 */6 * * *' # Every 6 hours
|
|
workflow_dispatch: # Allow manual triggering
|
|
|
|
jobs:
|
|
scan:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger Scan
|
|
run: |
|
|
# Get the deployment URL from environment or use a default
|
|
DEPLOYMENT_URL="${DEPLOYMENT_URL:-https://your-domain.com}"
|
|
|
|
echo "Triggering scan at: $DEPLOYMENT_URL/api/cron/scan?mode=all"
|
|
|
|
# Make the API call
|
|
response=$(curl -s -w "\n%{http_code}" -X POST "$DEPLOYMENT_URL/api/cron/scan?mode=all")
|
|
|
|
# Extract response body and status code
|
|
http_code=$(echo "$response" | tail -n1)
|
|
response_body=$(echo "$response" | head -n -1)
|
|
|
|
echo "Response Status: $http_code"
|
|
echo "Response Body: $response_body"
|
|
|
|
# Check if the request was successful
|
|
if [ "$http_code" -eq 200 ]; then
|
|
echo "✅ Scan triggered successfully"
|
|
else
|
|
echo "❌ Failed to trigger scan. Status: $http_code"
|
|
exit 1
|
|
fi
|
|
env:
|
|
DEPLOYMENT_URL: ${{ secrets.DEPLOYMENT_URL }} |