🔧 chore(ci): scope tsl playbook sync paths

This commit is contained in:
csh
2026-07-13 10:29:23 +08:00
parent a32dd5dd3c
commit df8c402afb
2 changed files with 68 additions and 18 deletions
+13 -5
View File
@@ -99,8 +99,13 @@ jobs:
python3 "$BUILD_SCRIPT" --output "$bundle"
# These are the only paths this workflow owns on the target branch.
generated_paths=(AGENTS.md docs skills)
for path in "${generated_paths[@]}"; do
managed_paths=(
"AGENTS.md"
"docs/tsl"
"skills/tsl-syntax-reference"
"skills/tsl-api-reference"
)
for path in "${managed_paths[@]}"; do
if [ ! -e "$bundle/$path" ]; then
echo "ERROR: bundle is missing expected path: $path" >&2
exit 1
@@ -116,10 +121,13 @@ jobs:
git rm -rf --cached --quiet . >/dev/null 2>&1 || true
fi
rm -rf "${generated_paths[@]}"
cp -R "$bundle"/. "$REPO_DIR"/
rm -rf -- "${managed_paths[@]}"
for path in "${managed_paths[@]}"; do
mkdir -p "$(dirname "$path")"
cp -R -- "$bundle/$path" "$path"
done
git add -A "${generated_paths[@]}"
git add -A -- "${managed_paths[@]}"
if git diff --cached --quiet; then
echo "No tsl-playbook changes to publish."