Weekly Recession Probability Report #16
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: Weekly Recession Probability Report | |
| on: | |
| schedule: | |
| # Run Monday at 9:00 AM ET (14:00 UTC) | |
| # Most FRED series update monthly; weekly captures new releases | |
| # without burning API credits on unchanged data | |
| - cron: "0 14 * * 1" | |
| workflow_dispatch: | |
| # Allow manual trigger from GitHub Actions UI | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-report: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run recession model | |
| env: | |
| FRED_API_KEY: ${{ secrets.FRED_API_KEY }} | |
| run: python automation/daily_report.py | |
| - name: Generate email via Claude API and send | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| MAIL_USERNAME: ${{ secrets.MAIL_USERNAME }} | |
| MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }} | |
| MAIL_PORT: ${{ secrets.MAIL_PORT }} | |
| EMAIL_TO: ${{ secrets.EMAIL_TO }} | |
| run: python automation/generate_email.py | |
| - name: Upload report artifacts | |
| uses: actions/upload-artifact@v4 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| with: | |
| name: recession-report-${{ github.run_id }} | |
| path: automation/output/ | |
| retention-days: 90 | |
| - name: Commit updated output | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add automation/output/daily_summary.json | |
| git diff --staged --quiet || git commit -m "Update weekly recession probability — $(date +%Y-%m-%d)" | |
| git push |