Skip to content

Address review: contain repo_id, clean up partial setup, keep repaire… #45

Address review: contain repo_id, clean up partial setup, keep repaire…

Address review: contain repo_id, clean up partial setup, keep repaire… #45

Workflow file for this run

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://huggingface.co/spaces/lerobot/LeLab
git config credential.helper '!f() { echo "username=Nico-robot"; echo "password=$HF_TOKEN"; }; f'
git push -f hf main