diff --git a/.githooks/pre-push b/.githooks/pre-push index d85266a..c639aee 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -4,3 +4,10 @@ set -eu ./scripts/g-docs/commit.sh " via .githooks/pre-push" + +# Without the below, local git client will think it's 1 commit ahead of origin after push +# if the docs were updated by the GitHub Actions bot via this hook. +if [ "$(git log -1 --pretty=format:"%cn")" = "github-actions[bot]" ]; then + git push + git pull +fi