Daily arXiv Update #135
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 arXiv Update | |
| on: | |
| schedule: | |
| # Weekdays 05:00 Beijing time = previous day 21:00 UTC, Sun-Thu cron | |
| - cron: '0 21 * * 0-4' | |
| workflow_dispatch: # 允许手动触发 | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-papers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: guohao_vitepress | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install Python dependencies | |
| run: pip install -r scripts/arxiv_radar/requirements.txt | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Run arXiv radar pipeline | |
| env: | |
| DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} | |
| run: npm run arxiv:update | |
| - name: Commit and push changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: update arXiv papers for $(date +'%Y-%m-%d')" | |
| branch: guohao_vitepress | |
| file_pattern: | | |
| data/papers.json | |
| data/stats.json | |
| data/embeddings_index.json | |
| docs/public/arxiv-data/*.json | |
| docs/public/arxiv-charts/*.html | |
| README.md | |
| - name: Copy updated README for default branch | |
| run: cp README.md /tmp/arxiv-radar-readme.md | |
| - name: Switch to main and sync README | |
| run: git fetch origin main && git checkout -B main origin/main && cp /tmp/arxiv-radar-readme.md README.md | |
| - name: Commit README status to main | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "docs: sync arXiv radar README status" | |
| branch: main | |
| file_pattern: README.md |