fix(ci): exclude .git from rsync --delete in sync-docs

rsync --delete removes everything in the destination that is absent from
the source. sencho/docs/ has no .git directory, so rsync was deleting
sencho-docs/.git/ on every run. The commit step then had no git repo to
work with, giving 'fatal: not in a git directory'.

Fix: add --exclude='.git' to the rsync invocation.
This commit is contained in:
SaelixCode
2026-03-23 08:02:42 -04:00
parent 4844e51714
commit 8902f6fb4c
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -268,7 +268,9 @@ jobs:
fi
- name: Copy /docs into sencho-docs root
run: rsync -av --delete sencho/docs/ sencho-docs/
# --exclude='.git' prevents rsync --delete from wiping the .git
# directory that was just cloned/initialized in the previous step.
run: rsync -av --delete --exclude='.git' sencho/docs/ sencho-docs/
- name: Commit and push to sencho-docs
working-directory: sencho-docs