Skip to content

Daily Paper Update #125

Daily Paper Update

Daily Paper Update #125

Workflow file for this run

name: Daily Paper Update
on:
schedule:
- cron: '0 12 * * 1-5' # Run Monday to Friday at 12 noon UTC
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
jobs:
update-papers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run paper pull
run: |
python scripts/pull_hf_daily.py
- name: Upload PDFs and JSON as artifacts
uses: actions/upload-artifact@v4
with:
name: paper-data
path: |
temp_pdfs
data/*.json
summarize-papers:
needs: update-papers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Download PDFs and JSON
uses: actions/download-artifact@v4
with:
name: paper-data
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run paper summarization
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
python scripts/summarize_papers.py
- name: Commit and push if changed
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "github-actions"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update daily papers $(date +'%Y-%m-%d')" && git push)
send-to-telegram:
needs: summarize-papers
uses: ./.github/workflows/send_to_telegram.yml
secrets: inherit