Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Fetch Papers

Fetch Papers #63

Workflow file for this run

name: Fetch Papers
on:
# Daily at 00:00 UTC
schedule:
- cron: '0 0 * * *'
# Manual trigger
workflow_dispatch:
permissions:
contents: write
jobs:
fetch-and-summarize:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Fetch and summarize papers
id: fetch
env:
MODELSCOPE_API_KEY: ${{ secrets.MODELSCOPE_API_KEY }}
run: |
python scripts/main.py
- name: Get current date
id: date
run: echo "date=$(date -u +'%Y-%m-%d %H:%M UTC')" >> $GITHUB_OUTPUT
- name: Get repository info
id: repo
run: |
echo "owner=${{ github.repository_owner }}" >> $GITHUB_OUTPUT
echo "repo=${{ github.event.repository.name }}" >> $GITHUB_OUTPUT
- name: Send email notification
if: success()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
subject: Paper Pulse Daily Report - ${{ steps.date.outputs.date }}
to: ${{ secrets.EMAIL_TO }}
from: Paper Pulse Bot <${{ secrets.EMAIL_USERNAME }}>
body: file://data/email_report.txt
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add data/ feed.xml config.js
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update papers data - $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
git push
fi