circleci: ensure docs/publish.sh works as part of pre-merge ci workflow (#736)

This commit is contained in:
Christian Schwarz
2023-09-09 12:41:06 +02:00
committed by GitHub
parent 8b0637ddcc
commit bc92660e09
2 changed files with 55 additions and 25 deletions
+11 -2
View File
@@ -3,6 +3,7 @@ set -euo pipefail
NON_INTERACTIVE=false
DO_CLONE=false
PUSH=false
while getopts "ca" arg; do
case "$arg" in
"a")
@@ -11,6 +12,9 @@ while getopts "ca" arg; do
"c")
DO_CLONE=true
;;
"P")
PUSH=true
;;
*)
echo "invalid option '-$arg'"
exit 1
@@ -93,6 +97,11 @@ if [ "$(git status --porcelain)" != "" ]; then
else
echo "nothing to commit"
fi
echo "pushing to GitHub pages repo"
git push origin master
if $PUSH; then
echo "pushing to GitHub pages repo"
git push origin master
else
echo "not pushing to GitHub pages repo, set -P flag to push"
fi