Run Update Paper Links (weekly) #45
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: Run Update Paper Links (weekly) | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 2 * * 1" | |
| # run every Monday at 2:00 AM | |
| env: | |
| GITHUB_USER_NAME: WinstonLiyte | |
| GITHUB_USER_EMAIL: [email protected] | |
| jobs: | |
| build: | |
| name: update | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| - name: Set up Python Env | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install arxiv | |
| pip install requests | |
| pip install pyyaml | |
| - name: Run quant_scholar.py | |
| run: | | |
| python quant_scholar.py --update_paper_links | |
| cp README.md wiki/index.md | |
| - name: Commit and Push | |
| run: | | |
| git config --global user.name "${{ env.GITHUB_USER_NAME }}" | |
| git config --global user.email "${{ env.GITHUB_USER_EMAIL }}" | |
| git add README.md docs/quant-scholar.json wiki/index.md | |
| git commit -m "[Workflow] Automatic Update Quant Scholar Paper List" || echo "No changes to commit" | |
| git push |