Update Citation #2
This file contains 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: Update Citation | |
on: | |
schedule: | |
- cron: '*/1 * * * *' | |
jobs: | |
update_citation: | |
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.x' | |
- name: Install dependencies | |
run: | | |
pip install requests # 或者任何其他依赖 | |
- name: Run update_citation.py | |
run: python update_citation.py | |
- name: Commit changes | |
run: | | |
git add README.md citation.json | |
git commit -m "Automatically update citation counts" || echo "No changes to commit" | |
git push |