Skip to content

Commit 5f7cf3d

Browse files
fix: fix push-to-hf workflow
1 parent 146f3b3 commit 5f7cf3d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/push-to-hf.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ jobs:
2929
- name: Push to Hugging Face
3030
env:
3131
HF_TOKEN: ${{ secrets.HF_TOKEN }}
32-
HF_REPO_TYPE: space
32+
HF_REPO_TYPE: spaces
3333
HF_REPO_ID: chenzihong/GraphGen
3434
run: |
35-
huggingface-cli login --token "$HF_TOKEN" --add-to-git-credential
36-
git clone https://huggingface.co/$HF_REPO_TYPE/$HF_REPO_ID hf-repo
35+
git config --global credential.helper store
36+
echo "https://user:${HF_TOKEN}@huggingface.co" > ~/.git-credentials
37+
38+
git clone https://huggingface.co/${HF_REPO_TYPE}/${HF_REPO_ID} hf-repo
3739
rsync -a --delete --exclude='.git' ./ hf-repo/
3840
cd hf-repo
3941
git add .
40-
git diff-index --quiet HEAD || (git commit -m "Auto-sync from ${{ inputs.ref }} at $(date -u)" && git push)
42+
git diff-index --quiet HEAD || \
43+
(git commit -m "Auto-sync from ${{ inputs.ref }} at $(date -u)" && git push)

0 commit comments

Comments
 (0)