i3t2y commited on
Commit
bbd8be7
·
1 Parent(s): 12cad7f

ci: HF sync workflow with file exclusions via deploy branch

Browse files
Files changed (1) hide show
  1. .github/workflows/sync-hf.yml +18 -1
.github/workflows/sync-hf.yml CHANGED
@@ -12,9 +12,26 @@ jobs:
12
  with:
13
  fetch-depth: 0
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  - name: Push to HuggingFace
16
  env:
17
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
  run: |
19
  git remote add hf https://noxke:${HF_TOKEN}@huggingface.co/spaces/noxke/noke || true
20
- git push hf main --force
 
12
  with:
13
  fetch-depth: 0
14
 
15
+ - name: Configure git
16
+ run: |
17
+ git config --global user.email "i3t2y@users.noreply.github.com"
18
+ git config --global user.name "i3t2y"
19
+
20
+ - name: Create HF-only branch without excluded files
21
+ run: |
22
+ git checkout -b hf-deploy
23
+ # 删除 docs 目录(排除整目录)
24
+ git rm -r docs/ || true
25
+ # 删除其他非运行时文件
26
+ git rm config.json.example || true
27
+ git rm routes/debug_probe.py || true
28
+ git rm core/image_upload.py || true
29
+ git rm .agents/skills/noke-proxy/SKILL.md || true
30
+ git commit -m "chore: HF Space deploy - exclude non-runtime files" --allow-empty || true
31
+
32
  - name: Push to HuggingFace
33
  env:
34
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
35
  run: |
36
  git remote add hf https://noxke:${HF_TOKEN}@huggingface.co/spaces/noxke/noke || true
37
+ git push hf hf-deploy:main --force