Spaces:
Running
Running
Commit ·
2c42b88
1
Parent(s): e73506b
feat: redeploy fresh model weights and demo trajectories
Browse files
.github/workflows/hf_sync.yml
CHANGED
|
@@ -3,7 +3,7 @@ name: Sync to Hugging Face Spaces
|
|
| 3 |
on:
|
| 4 |
push:
|
| 5 |
branches: [main]
|
| 6 |
-
workflow_dispatch:
|
| 7 |
|
| 8 |
jobs:
|
| 9 |
sync:
|
|
@@ -14,28 +14,12 @@ jobs:
|
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
|
| 17 |
-
- name: Debug Secret Presence
|
| 18 |
-
run: |
|
| 19 |
-
if [ -z "${{ secrets.HF_TOKEN }}" ]; then
|
| 20 |
-
echo "❌ HF_TOKEN is empty or missing in GitHub Repository Secrets!"
|
| 21 |
-
exit 1
|
| 22 |
-
else
|
| 23 |
-
echo "✅ HF_TOKEN is successfully configured in GitHub Repository Secrets (len: ${#HF_TOKEN})."
|
| 24 |
-
fi
|
| 25 |
-
env:
|
| 26 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 27 |
-
|
| 28 |
- name: Push to Hugging Face
|
| 29 |
env:
|
| 30 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 31 |
run: |
|
| 32 |
-
# 1. Initialize Git LFS inside the runner
|
| 33 |
git lfs install
|
| 34 |
-
|
| 35 |
-
# 2. Configure a named remote to allow Git LFS to authenticate correctly
|
| 36 |
git remote add hf https://sadhumitha-s:$HF_TOKEN@huggingface.co/spaces/sadhumitha-s/DT-Explorer
|
| 37 |
-
|
| 38 |
-
# 3. Force push using HEAD:main to the hf remote
|
| 39 |
git push --force hf HEAD:main 2> push_err.txt || {
|
| 40 |
echo "=== HUGGING FACE PUSH ERROR LOG ==="
|
| 41 |
if [ -n "$HF_TOKEN" ]; then
|
|
@@ -45,10 +29,3 @@ jobs:
|
|
| 45 |
fi
|
| 46 |
exit 1
|
| 47 |
}
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 3 |
on:
|
| 4 |
push:
|
| 5 |
branches: [main]
|
| 6 |
+
workflow_dispatch:
|
| 7 |
|
| 8 |
jobs:
|
| 9 |
sync:
|
|
|
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
- name: Push to Hugging Face
|
| 18 |
env:
|
| 19 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
run: |
|
|
|
|
| 21 |
git lfs install
|
|
|
|
|
|
|
| 22 |
git remote add hf https://sadhumitha-s:$HF_TOKEN@huggingface.co/spaces/sadhumitha-s/DT-Explorer
|
|
|
|
|
|
|
| 23 |
git push --force hf HEAD:main 2> push_err.txt || {
|
| 24 |
echo "=== HUGGING FACE PUSH ERROR LOG ==="
|
| 25 |
if [ -n "$HF_TOKEN" ]; then
|
|
|
|
| 29 |
fi
|
| 30 |
exit 1
|
| 31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|