Generate Activity Reports #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Activity Reports | |
| on: | |
| schedule: | |
| # Run weekly on Monday at 00:00 UTC | |
| - cron: '0 0 * * 1' | |
| workflow_dispatch: # Allow manual trigger | |
| push: | |
| branches: [ master, main ] | |
| paths: | |
| - '.github/workflows/generate-reports.yml' | |
| - 'whatdidyougetdone.py' | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Generate reports | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| mkdir -p reports | |
| # Generate individual reports | |
| echo "Generating report for TimeToBuildBob..." | |
| uv run ./whatdidyougetdone.py report TimeToBuildBob --days 7 --file reports/bob-weekly.md | |
| echo "Generating report for ErikBjare..." | |
| uv run ./whatdidyougetdone.py report ErikBjare --days 7 --file reports/erik-weekly.md | |
| # Generate team report | |
| echo "Generating gptme team report..." | |
| uv run ./whatdidyougetdone.py team ErikBjare TimeToBuildBob --days 7 --file reports/gptme-team-weekly.md | |
| # Copy web UI files | |
| echo "Copying web UI files..." | |
| cp index.html reports/ | |
| cp style.css reports/ | |
| cp script.js reports/ | |
| # Create index.md for reference | |
| cat > reports/index.md << 'EOF' | |
| # Activity Reports | |
| Auto-generated weekly activity reports using [whatdidyougetdone](https://github.com/ErikBjare/whatdidyougetdone). | |
| ## Individual Reports | |
| - [Bob's Activity](bob-weekly.md) | |
| - [Erik's Activity](erik-weekly.md) | |
| ## Team Reports | |
| - [gptme Team Activity](gptme-team-weekly.md) | |
| --- | |
| Last updated: $(date -u '+%Y-%m-%d %H:%M UTC') | |
| EOF | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./reports | |
| publish_branch: gh-pages | |
| commit_message: 'docs: update activity reports' |