cd: deploy to space
Browse files
.github/workflows/huggingface-sync.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to Hugging Face Space
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
sync:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
steps:
|
| 11 |
+
- name: Checkout repository
|
| 12 |
+
uses: actions/checkout@v4
|
| 13 |
+
with:
|
| 14 |
+
fetch-depth: 0
|
| 15 |
+
|
| 16 |
+
- name: Configure Git
|
| 17 |
+
run: |
|
| 18 |
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 19 |
+
git config --global user.name "github-actions[bot]"
|
| 20 |
+
|
| 21 |
+
- name: Login to Hugging Face
|
| 22 |
+
env:
|
| 23 |
+
HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
|
| 24 |
+
run: |
|
| 25 |
+
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
|
| 26 |
+
|
| 27 |
+
- name: Push to Hugging Face Space
|
| 28 |
+
run: |
|
| 29 |
+
git remote add space https://huggingface.co/spaces/JeffYang52415/LLMEval-Dataset-Parser
|
| 30 |
+
git push space main:main
|