Spaces:
Sleeping
Sleeping
Essi
commited on
Commit
Β·
e57ee60
1
Parent(s):
5af914e
perf: simplify sync_to_huggingface.yaml by using newly created GH Action
Browse files
.github/workflows/sync_to_huggingface.yaml
CHANGED
@@ -5,36 +5,14 @@ on:
|
|
5 |
branches: [main]
|
6 |
workflow_dispatch:
|
7 |
|
8 |
-
env:
|
9 |
-
HF_USER: ealizadeh
|
10 |
-
HF_REPO: ealizadeh/GAIA-Agent
|
11 |
-
|
12 |
jobs:
|
13 |
sync-to-hf-hub:
|
14 |
runs-on: ubuntu-latest
|
15 |
|
16 |
steps:
|
17 |
-
- name:
|
18 |
-
uses: actions/
|
19 |
with:
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
- name: Verify π€ HF repo exists
|
24 |
-
run: |
|
25 |
-
if git ls-remote "https://huggingface.co/spaces/${HF_REPO}.git" &> /dev/null; then
|
26 |
-
echo "β
HF repo found: ${HF_REPO}"
|
27 |
-
else
|
28 |
-
echo "β HF repo not found at https://huggingface.co/spaces/${HF_REPO}.git" && exit 1
|
29 |
-
fi
|
30 |
-
|
31 |
-
- name: Push to HF repo π€
|
32 |
-
env:
|
33 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
34 |
-
run: |
|
35 |
-
echo "β Pushing local 'main' β HF '${HF_REPO}' (force)"
|
36 |
-
if git push -f "https://${HF_USER}:$HF_TOKEN@huggingface.co/spaces/${HF_REPO}.git" main; then
|
37 |
-
echo "β
Push succeeded."
|
38 |
-
else
|
39 |
-
echo "β Push failed. Double-check 'HF_TOKEN' and permissions." && exit 1
|
40 |
-
fi
|
|
|
5 |
branches: [main]
|
6 |
workflow_dispatch:
|
7 |
|
|
|
|
|
|
|
|
|
8 |
jobs:
|
9 |
sync-to-hf-hub:
|
10 |
runs-on: ubuntu-latest
|
11 |
|
12 |
steps:
|
13 |
+
- name: π€ HF Space Sync
|
14 |
+
uses: e-alizadeh/gh-actions/hf-space-sync@main
|
15 |
with:
|
16 |
+
hf_user: "ealizadeh"
|
17 |
+
hf_space: "GAIA-Agent"
|
18 |
+
hf_token: ${{ secrets.HF_TOKEN }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|