Spaces:
Running
Running
ci: restructure the steps to deploy to hf
Browse files- .github/workflows/release.yml +28 -12
.github/workflows/release.yml
CHANGED
|
@@ -75,18 +75,34 @@ jobs:
|
|
| 75 |
- name: Install Dependencies
|
| 76 |
run: pnpm install --no-frozen-lockfile --recursive
|
| 77 |
|
| 78 |
-
- name:
|
| 79 |
-
run:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
- name:
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
to: .
|
| 86 |
-
space: timpietrusky/lerobot-js
|
| 87 |
-
token: ${{ secrets.HF_TOKEN }}
|
| 88 |
|
| 89 |
-
- name:
|
| 90 |
run: |
|
| 91 |
-
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
- name: Install Dependencies
|
| 76 |
run: pnpm install --no-frozen-lockfile --recursive
|
| 77 |
|
| 78 |
+
- name: Update cyberpunk dependency to use published version
|
| 79 |
+
run: |
|
| 80 |
+
# Get the actual version from packages/web/package.json
|
| 81 |
+
WEB_VERSION=$(node -p "require('./packages/web/package.json').version")
|
| 82 |
+
cd examples/cyberpunk-standalone
|
| 83 |
+
# Replace file dependency with published version
|
| 84 |
+
sed -i 's/"@lerobot\/web": "file:..\/..\/packages\/web"/"@lerobot\/web": "^'$WEB_VERSION'"/' package.json
|
| 85 |
+
echo "Updated cyberpunk package.json to use published version ^$WEB_VERSION"
|
| 86 |
+
|
| 87 |
+
- name: Prepare README for HF Space
|
| 88 |
+
run: |
|
| 89 |
+
# Create HF Space frontmatter by directly copying from hf_config.yml
|
| 90 |
+
cat docs/hf_config.yml > README_temp.md
|
| 91 |
+
echo "" >> README_temp.md
|
| 92 |
+
cat README.md >> README_temp.md
|
| 93 |
+
mv README_temp.md README.md
|
| 94 |
|
| 95 |
+
- name: Configure git
|
| 96 |
+
run: |
|
| 97 |
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 98 |
+
git config --global user.name "github-actions[bot]"
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
+
- name: Commit HF Space changes
|
| 101 |
run: |
|
| 102 |
+
git add README.md examples/cyberpunk-standalone/package.json
|
| 103 |
+
git commit -m "Add HF Space frontmatter and update cyberpunk dependency for deployment" || echo "No changes to commit"
|
| 104 |
+
|
| 105 |
+
- name: Deploy to Hugging Face Spaces
|
| 106 |
+
env:
|
| 107 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 108 |
+
run: git push https://NERDDISCO:$HF_TOKEN@huggingface.co/spaces/NERDDISCO/LeRobot.js main --force
|