forked from huggingface/leLab
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) 路 1.04 KB
/
Copy pathsync_space.yml
File metadata and controls
35 lines (34 loc) 路 1.04 KB
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
name: Sync frontend to Hugging Face Space
on:
push:
branches: [main]
paths:
- 'frontend/**'
- '!frontend/dist/**'
- '.github/workflows/sync_space.yml'
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.0
with:
lfs: true
persist-credentials: false
- name: Push frontend/ (without dist/) to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
cd frontend
# The Space builds its own bundle via Docker; dist/ would be
# rejected by HF's pre-receive hook for containing raw binaries.
rm -rf dist
git init -b main
git config user.email "ci@huggingface.co"
git config user.name "GitHub CI"
git add -A
git commit -m "Sync from leLab @ ${GITHUB_SHA}"
git remote add hf https://Nico-robot:$HF_TOKEN@huggingface.co/spaces/lerobot/LeLab
git push -f hf main