Spaces:
Sleeping
Sleeping
chore: add hf frontmatter
Browse files
.github/workflows/hf_sync.yml
CHANGED
|
@@ -13,7 +13,33 @@ jobs:
|
|
| 13 |
- uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
- name: Push to hub
|
| 17 |
env:
|
| 18 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 19 |
-
run: git push https://mylessss:[email protected]/spaces/marimo-team/marimo-learn main
|
|
|
|
| 13 |
- uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
+
|
| 17 |
+
- name: Configure Git
|
| 18 |
+
run: |
|
| 19 |
+
git config --global user.name "GitHub Action"
|
| 20 |
+
git config --global user.email "[email protected]"
|
| 21 |
+
|
| 22 |
+
- name: Prepend frontmatter to README
|
| 23 |
+
run: |
|
| 24 |
+
if [ -f README.md ] && ! grep -q "^---" README.md; then
|
| 25 |
+
FRONTMATTER="---
|
| 26 |
+
title: marimo learn
|
| 27 |
+
emoji: 🧠
|
| 28 |
+
colorFrom: blue
|
| 29 |
+
colorTo: indigo
|
| 30 |
+
sdk: docker
|
| 31 |
+
sdk_version: \"latest\"
|
| 32 |
+
app_file: app.py
|
| 33 |
+
pinned: false
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
"
|
| 37 |
+
echo "$FRONTMATTER$(cat README.md)" > README.md
|
| 38 |
+
git add README.md
|
| 39 |
+
git commit -m "Add HF frontmatter to README" || echo "No changes to commit"
|
| 40 |
+
fi
|
| 41 |
+
|
| 42 |
- name: Push to hub
|
| 43 |
env:
|
| 44 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 45 |
+
run: git push -f https://mylessss:[email protected]/spaces/marimo-team/marimo-learn main
|