diff --git a/tools/ci-sync-docs.sh b/tools/ci-sync-docs.sh index 10bcc56e4..8ddae25be 100755 --- a/tools/ci-sync-docs.sh +++ b/tools/ci-sync-docs.sh @@ -41,15 +41,16 @@ else fi for commit in $(git rev-list --reverse --no-merges "$commit_range" -- docs); do - rm -fR "website/$dest" - cp -r "docs" "website/$dest" - + git checkout "$commit" git show \ --quiet \ --format="%B%n${GITHUB_REPOSITORY}@%H" \ "$commit" \ > commit-message + rm -fR "website/$dest" + cp -r "docs" "website/$dest" + pushd website git add "$dest" git diff-index --quiet HEAD -- || git commit --file=../commit-message