Spaces:
Running
Running
ci: configure hf space
Browse files- .github/workflows/hf-space.yml +37 -0
- docs/hf_config.yml +11 -0
.github/workflows/hf-space.yml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face space
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches: [main]
|
5 |
+
workflow_dispatch:
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
sync-to-hub:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
steps:
|
11 |
+
- uses: actions/checkout@v3
|
12 |
+
with:
|
13 |
+
fetch-depth: 0
|
14 |
+
lfs: true
|
15 |
+
|
16 |
+
- name: Prepare README for HF Space
|
17 |
+
run: |
|
18 |
+
# Create HF Space frontmatter by directly copying from hf_config.yml
|
19 |
+
cat docs/hf_config.yml > README_temp.md
|
20 |
+
echo "" >> README_temp.md
|
21 |
+
cat README.md >> README_temp.md
|
22 |
+
mv README_temp.md README.md
|
23 |
+
|
24 |
+
- name: Configure git
|
25 |
+
run: |
|
26 |
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
27 |
+
git config --global user.name "github-actions[bot]"
|
28 |
+
|
29 |
+
- name: Commit HF Space README
|
30 |
+
run: |
|
31 |
+
git add README.md
|
32 |
+
git commit -m "Add HF Space frontmatter to README" || echo "No changes to commit"
|
33 |
+
|
34 |
+
- name: Push to hub
|
35 |
+
env:
|
36 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
37 |
+
run: git push https://NERDDISCO:[email protected]/spaces/NERDDISCO/LeRobot.js main --force
|
docs/hf_config.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: LeRobot.js
|
3 |
+
emoji: 🤖
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
+
sdk: static
|
7 |
+
app_build_command: pnpm run build
|
8 |
+
app_file: dist/index.html
|
9 |
+
pinned: true
|
10 |
+
---
|
11 |
+
|