-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Goal
To provide automated, regular insights into application usage by creating a scheduled job that generates a daily analytics report and commits it back to the repository, creating a self-updating dashboard.
To-Do List
- Create the Analytics Script:
- In
scripts/generate_analytics.py, write a Python script that connects to the production database. - The script should query for key daily metrics (e.g., new users, queries asked, most active chat).
- The script should format these metrics into a clean
analytics_report.mdMarkdown file.
- In
- Create the GitHub Actions Workflow:
- In
.github/workflows/daily_analytics.yml, create a new workflow. - Use the
on: schedule:trigger with a cron syntax to run once a day (e.g.,'0 1 * * *'for 1 AM UTC). - The workflow must check out the code, set up Python, and install dependencies.
- Securely access the database: Pass the production
DATABASE_URLto the script as an environment variable, sourcing it from a GitHub Secret. - Add a step to run the
python scripts/generate_analytics.pyscript. - Add a final step using the
ad-m/github-push-action@v0.6.0action to automatically commit and push the generatedanalytics_report.mdback to themainbranch.
- In
Acceptance Criteria
- A new
analytics_report.mdfile is automatically generated and committed to the repository every 24 hours. - The workflow runs successfully on schedule without exposing any credentials.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels