Daily Recommendations Update #114
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 Recommendations Update | |
| on: | |
| schedule: | |
| - cron: '23 17 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-content: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| cache: 'pip' # 启用 pip 缓存 | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Run update script | |
| env: | |
| DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} | |
| EXA_API_KEY: ${{ secrets.EXA_API_KEY }} | |
| run: | | |
| python scripts/update_daily.py | |
| - name: Commit and push changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add _data/recommendations.yml _data/history.json | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "DeepSeek AI Daily Update with History" && git push) |