Daily trends check #10
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: Daily trends check | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" # 02:00 UTC every day | |
| workflow_dispatch: # allow manual runs from the Actions tab | |
| permissions: | |
| contents: write # let the bot commit data/reports back to this repo | |
| jobs: | |
| track: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Check trends and build report | |
| env: | |
| PANGOLIN_TOKEN: ${{ secrets.PANGOLIN_TOKEN }} | |
| run: | | |
| python google_trends_tracker.py run | |
| python google_trends_tracker.py report | |
| - name: Commit results | |
| run: | | |
| git config user.name "trends-bot" | |
| git config user.email "[email protected]" | |
| git add keywords.json data/ reports/ | |
| git commit -m "chore: daily trends update $(date -u +%F)" || echo "no changes" | |
| git push |