Monthly Digest #5
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: Monthly Digest | |
| on: | |
| schedule: | |
| - cron: '0 0 1 * *' # 1st of month UTC midnight | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| concurrency: | |
| group: digest-push-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| monthly: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Configure git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Sync latest branch | |
| run: git pull --rebase origin ${{ github.ref_name }} | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run monthly rollup | |
| run: python main.py --mode monthly | |
| env: | |
| OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} | |
| API_NINJAS_KEY: ${{ secrets.API_NINJAS_KEY }} | |
| # ββ Optional delivery sinks ββββββββββββββββββββββββββββββββββ | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| SERVERCHAN_SENDKEY: ${{ secrets.SERVERCHAN_SENDKEY }} | |
| - name: Commit and push monthly report | |
| run: | | |
| # Generated JSON stays ignored locally, so CI force-adds it when publishing. | |
| git add docs/ | |
| git add -f docs/data/ | |
| git diff --staged --quiet || git commit -m "monthly: $(date -u +%Y-%m)" | |
| git pull --rebase -X ours origin ${{ github.ref_name }} | |
| git push | |
| - name: Trigger Pages publish | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_API_URL: ${{ github.api_url }} | |
| GH_REPOSITORY: ${{ github.repository }} | |
| GH_REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| curl --fail-with-body -L \ | |
| -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${GH_TOKEN}" \ | |
| "${GH_API_URL}/repos/${GH_REPOSITORY}/actions/workflows/pages.yml/dispatches" \ | |
| -d "{\"ref\":\"${GH_REF_NAME}\"}" |