docs / CI: stop creating churn with doc commits & commit as zreplbot@

This commit is contained in:
Christian Schwarz 2021-07-08 16:52:11 +02:00
parent bf1276f767
commit bcfcd7a134
2 changed files with 13 additions and 10 deletions

View File

@ -358,7 +358,7 @@ jobs:
subcommand: docdep
- run:
command: |
git config --global user.email "me@cschwarz.com"
git config --global user.email "zreplbot@cschwarz.com"
git config --global user.name "zrepl-github-io-ci"
# https://circleci.com/docs/2.0/add-ssh-key/#adding-multiple-keys-with-blank-hostnames

View File

@ -1,6 +1,5 @@
#!/bin/bash
set -eo pipefail
set -euo pipefail
NON_INTERACTIVE=false
DO_CLONE=false
@ -13,7 +12,7 @@ while getopts "ca" arg; do
DO_CLONE=true
;;
*)
echo invalid option
echo "invalid option '-$arg'"
exit 1
;;
esac
@ -27,11 +26,6 @@ checkout_repo_msg() {
echo "clone ${GHPAGESREPO} to ${PUBLICDIR}:"
}
exit_msg() {
echo "error, exiting..."
}
trap exit_msg EXIT
if ! type sphinx-versioning >/dev/null; then
echo "install sphinx-versioning and come back"
exit 1
@ -71,6 +65,9 @@ git reset --hard origin/master
echo "cleaning GitHub pages repo"
git rm -rf .
cat > .gitignore <<EOF
**/.doctrees
EOF
popd
@ -96,7 +93,13 @@ COMMIT_MSG="sphinx-versioning render from publish.sh - $(date -u) - ${CURRENT_CO
pushd "$PUBLICDIR"
echo "adding and commiting all changes in GitHub pages repo"
git add .gitignore
git add -A
git commit -m "$COMMIT_MSG"
if [ "$(git status --porcelain)" != "" ]; then
git commit -m "$COMMIT_MSG"
else
echo "nothing to commit"
fi
echo "pushing to GitHub pages repo"
git push origin master