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 : Deploy to Hugging Face Space 🚀
1+ name : Sync to Hugging Face hub
22
33on :
44 push :
5- branches :
6- - main # or your chosen branch
5+ branches : [main] # Adjust if your branch is not 'main'
6+
7+ workflow_dispatch : # Allows manual triggering from GitHub UI
78
89jobs :
9- deploy :
10+ sync-to-hub :
1011 runs-on : ubuntu-latest
1112
1213 steps :
13- - name : Checkout the repo
14+ - name : Checkout repo
1415 uses : actions/checkout@v3
15-
16- - name : Deploy to Hugging Face Space
17- uses : huggingface/huggingface_hub@v0.18.0
1816 with :
19- repo-type : space
20- space-id : daniellegauthier/RGB-Root-Matriz-Color-Plotter
21- huggingface_token : ${{ secrets.SYNC_TO_HUGGING_FACE_HUB }} # 👈 securely inject the token
17+ fetch-depth : 0
18+ lfs : true # If you're using large files
19+
20+ - name : Set Git identity
21+ run : |
22+ git config --global user.email "github-actions@github.com"
23+ git config --global user.name "github-actions"
24+
25+ - name : Push to Hugging Face Space
26+ env :
27+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
28+ run : |
29+ git remote add hf https://daniellegauthier:$HF_TOKEN@huggingface.co/spaces/daniellegauthier/RGB-Root-Matriz-Color-Plotter
30+ git push -f hf main # Force push to overwrite if needed
You can’t perform that action at this time.
0 commit comments