File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Sync to Hugging Face Hub
2-
3- on :
4- push :
5- branches : [main]
6- # Allows you to run this workflow manually from the Actions tab
7- workflow_dispatch :
8-
9- jobs :
10- sync-to-hub :
11- runs-on : ubuntu-latest
12- steps :
13- - name : Checkout Code
14- uses : actions/checkout@v4
15- with :
16- fetch-depth : 0
17- lfs : true
18-
19- - name : Push to Hub
1+ - name : Push to Hub
202 env :
213 HF_TOKEN : ${{ secrets.HF_TOKEN }}
224 run : |
23- # Force push to the 'main' branch of your Hugging Face Space
5+ # 1. Remove the docs folder from the local temporary sync
6+ rm -rf docs/
7+
8+ # 2. Commit the deletion locally so Git knows they are gone
9+ git config user.name github-actions
10+ git config user.email github-actions@github.com
11+ git add .
12+ git commit -m "Remove docs for HF sync" || echo "No docs to remove"
13+
14+ # 3. Push to Hugging Face
2415 git push -f https://asksunny:$HF_TOKEN@huggingface.co/spaces/asksunny/Compileo main
You can’t perform that action at this time.
0 commit comments