Skip to content

Update HuggingFace Trending Feed #12

Update HuggingFace Trending Feed

Update HuggingFace Trending Feed #12

Workflow file for this run

name: Update HuggingFace Trending Feed
on:
schedule:
- cron: '0 0 * * *' # 每天运行一次
workflow_dispatch: # 允许手动触发
jobs:
update-feed:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update feeds
run: python update_feed.py
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add docs/
git diff --quiet && git diff --staged --quiet || (git commit -m "Update feeds" && git push origin main)
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}