Doc CI: always use `git add --all` and `git diff --staged`
Fixes that some changes were not considered in the sync job.
@@ -78,11 +78,12 @@ jobs:
find gdnative -name .html -o -type f -print0 | xargs -0 sed -i 's/'"$libVersion"'/master/g'
- if git diff --exit-code --quiet
+ # Add all files to index and look at staged diff
+ git add --all
+ if git diff --exit-code --staged --quiet
then
echo "$shortSha introduces no doc changes; skip commit and push."
else
- git add --all
git commit -m "Sync doc from $shortSha
Revision in godot-rust: ${GITHUB_SHA}"
