Skip to content

Commit a4983b4

Browse files
committed
Update sync to hf spaces yml
1 parent a63c86d commit a4983b4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/sync-to-hugging-face-hub.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,22 @@ jobs:
3636
pip install --upgrade huggingface_hub
3737
huggingface-cli login --token ${{ secrets.HUGGINGFACE_API_KEY }}
3838
39-
- name: Push to hub
39+
- name: Sync and Push to hub
4040
env:
4141
HF_TOKEN: ${{ secrets.HF_TOKEN }}
4242
run: |
43+
# Configure remote
44+
git remote set-url origin https://Prgrmmer:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Prgrmmer/ai-dungeon
45+
46+
# Pull latest changes
47+
git pull origin main --rebase
48+
49+
# Add and commit LFS config
4350
git add .gitattributes
4451
git commit -m "Update LFS tracking" || true
45-
git remote set-url origin https://Prgrmmer:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Prgrmmer/ai-dungeon
52+
53+
# Push LFS objects and changes
4654
git lfs push --all origin main
47-
git push origin main
55+
git push origin main
56+
57+

0 commit comments

Comments
 (0)