228cd1cf8c
PR Test / lint (pull_request) Successful in 2s
- Fix kb-workflow -> kb_workflow (underscore not hyphen) - Remove non-existent skill directories from the list - Only include skills that actually exist in the repo
39 lines
942 B
YAML
39 lines
942 B
YAML
name: Deploy kb-skills
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git clone --depth 1 ssh://gitea-nas/starmen1265/kb-skills.git /tmp/kb-skills-deploy
|
|
|
|
- name: Sync to global skills directory
|
|
run: |
|
|
SKILLS_DIR="/home/starmen1265/.openclaw/skills"
|
|
SRC_DIR="/tmp/kb-skills-deploy"
|
|
|
|
# 技能列表 (目录名必须与仓库中的实际目录名匹配)
|
|
SKILLS=(
|
|
"gsd-openclaw"
|
|
"kb_workflow"
|
|
"todo-manager"
|
|
)
|
|
|
|
for skill in "${SKILLS[@]}"; do
|
|
if [ -d "$SRC_DIR/$skill" ]; then
|
|
rsync -av --delete "$SRC_DIR/$skill/" "$SKILLS_DIR/$skill/"
|
|
echo "✅ Synced: $skill"
|
|
fi
|
|
done
|
|
|
|
echo "🎉 Deployed at $(date)"
|
|
|
|
- name: Cleanup
|
|
run: rm -rf /tmp/kb-skills-deploy
|