Merge pull request #3 from jeff52415/fix/bug-fixes
Browse files
.github/workflows/ci.yml
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
name: CI
|
| 2 |
|
| 3 |
on:
|
| 4 |
-
push:
|
| 5 |
-
branches: [main]
|
| 6 |
pull_request:
|
| 7 |
branches: [main]
|
| 8 |
|
|
|
|
| 1 |
name: CI
|
| 2 |
|
| 3 |
on:
|
|
|
|
|
|
|
| 4 |
pull_request:
|
| 5 |
branches: [main]
|
| 6 |
|
.github/workflows/huggingface-sync.yml
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
name: Deploy to Hugging Face Space
|
| 2 |
|
| 3 |
on:
|
|
|
|
| 4 |
push:
|
| 5 |
branches: [main]
|
| 6 |
|
|
@@ -12,6 +13,7 @@ jobs:
|
|
| 12 |
uses: actions/checkout@v4
|
| 13 |
with:
|
| 14 |
fetch-depth: 0
|
|
|
|
| 15 |
|
| 16 |
- name: Configure Git
|
| 17 |
run: |
|
|
@@ -34,8 +36,10 @@ jobs:
|
|
| 34 |
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
|
| 35 |
|
| 36 |
- name: Push to Hugging Face Space
|
|
|
|
|
|
|
| 37 |
run: |
|
| 38 |
-
git remote add space https://huggingface.co/spaces/JeffYang52415/LLMEval-Dataset-Parser || true
|
| 39 |
git fetch space || true
|
| 40 |
-
|
| 41 |
git push -f space main:main
|
|
|
|
| 1 |
name: Deploy to Hugging Face Space
|
| 2 |
|
| 3 |
on:
|
| 4 |
+
workflow_dispatch:
|
| 5 |
push:
|
| 6 |
branches: [main]
|
| 7 |
|
|
|
|
| 13 |
uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
+
ref: ${{ github.head_ref || github.ref_name }}
|
| 17 |
|
| 18 |
- name: Configure Git
|
| 19 |
run: |
|
|
|
|
| 36 |
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
|
| 37 |
|
| 38 |
- name: Push to Hugging Face Space
|
| 39 |
+
env:
|
| 40 |
+
HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
|
| 41 |
run: |
|
| 42 |
+
git remote add space "https://JeffYang52415:$HF_TOKEN@huggingface.co/spaces/JeffYang52415/LLMEval-Dataset-Parser" || true
|
| 43 |
git fetch space || true
|
| 44 |
+
git branch -M main
|
| 45 |
git push -f space main:main
|