Skip to content

Schedule Papers Update #487

Schedule Papers Update

Schedule Papers Update #487

Workflow file for this run

name: Schedule Papers Update
on:
schedule:
- cron: '0 23 * * *' # 每天午夜执行
workflow_dispatch: # 手动触发
jobs:
update-papers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Python script
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }}
run: python update_papers.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'Update papers'
git push
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site