Spaces:
Running
Running
CrispStrobe commited on
Commit ·
ff2d960
1
Parent(s): e9acff4
ci: fix HF authentication in workflows by embedding token in remote URL
Browse files
.github/workflows/update-benchmarks.yml
CHANGED
|
@@ -43,9 +43,13 @@ jobs:
|
|
| 43 |
env:
|
| 44 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 45 |
run: |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
# Prepend metadata only for the HF version of README
|
| 48 |
cat .huggingface/space.yml README.md > HF_README.md
|
| 49 |
mv HF_README.md README.md
|
| 50 |
git commit -am "chore: sync to Hugging Face with metadata" || true
|
| 51 |
-
git push
|
|
|
|
| 43 |
env:
|
| 44 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 45 |
run: |
|
| 46 |
+
if [ -z "$HF_TOKEN" ]; then
|
| 47 |
+
echo "HF_TOKEN is not set, skipping sync."
|
| 48 |
+
exit 0
|
| 49 |
+
fi
|
| 50 |
+
git remote add hf https://cstr:$HF_TOKEN@huggingface.co/spaces/cstr/LLMProviders || true
|
| 51 |
# Prepend metadata only for the HF version of README
|
| 52 |
cat .huggingface/space.yml README.md > HF_README.md
|
| 53 |
mv HF_README.md README.md
|
| 54 |
git commit -am "chore: sync to Hugging Face with metadata" || true
|
| 55 |
+
git push hf main --force
|
.github/workflows/update-providers.yml
CHANGED
|
@@ -46,9 +46,13 @@ jobs:
|
|
| 46 |
env:
|
| 47 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 48 |
run: |
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# Prepend metadata only for the HF version of README
|
| 51 |
cat .huggingface/space.yml README.md > HF_README.md
|
| 52 |
mv HF_README.md README.md
|
| 53 |
git commit -am "chore: sync to Hugging Face with metadata" || true
|
| 54 |
-
git push
|
|
|
|
| 46 |
env:
|
| 47 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 48 |
run: |
|
| 49 |
+
if [ -z "$HF_TOKEN" ]; then
|
| 50 |
+
echo "HF_TOKEN is not set, skipping sync."
|
| 51 |
+
exit 0
|
| 52 |
+
fi
|
| 53 |
+
git remote add hf https://cstr:$HF_TOKEN@huggingface.co/spaces/cstr/LLMProviders || true
|
| 54 |
# Prepend metadata only for the HF version of README
|
| 55 |
cat .huggingface/space.yml README.md > HF_README.md
|
| 56 |
mv HF_README.md README.md
|
| 57 |
git commit -am "chore: sync to Hugging Face with metadata" || true
|
| 58 |
+
git push hf main --force
|