File size: 1,122 Bytes
37cb834 b01d107 37cb834 b01d107 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
name: Deploy to Hugging Face Space
on:
push:
branches: [main]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Hugging Face CLI
run: |
pip install --upgrade huggingface-hub
- name: Login to Hugging Face
env:
HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
run: |
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
- name: Push to Hugging Face Space
run: |
git remote add space https://huggingface.co/spaces/JeffYang52415/LLMEval-Dataset-Parser || true
git fetch space || true
# Force push to ensure sync, use with caution
git push -f space main:main
|