jamesfredley commented on code in PR #67:
URL:
https://github.com/apache/grails-github-actions/pull/67#discussion_r2969981206
##########
deploy-github-pages/entrypoint.sh:
##########
@@ -316,6 +316,21 @@ git status
echo "Committing changes."
git commit -m "Deploying to documentation branch - $(date +"%T")" --quiet
--allow-empty
-git push "${GIT_REPO_URL}" "${DOCUMENTATION_BRANCH}"
-echo "Deployment successful!"
+
+MAX_PUSH_ATTEMPTS=5
+PUSH_ATTEMPT=1
+while [ $PUSH_ATTEMPT -le $MAX_PUSH_ATTEMPTS ]; do
+ echo "Push attempt ${PUSH_ATTEMPT}/${MAX_PUSH_ATTEMPTS}"
+ if git push "${GIT_REPO_URL}" "${DOCUMENTATION_BRANCH}" 2>&1; then
+ echo "Deployment successful!"
+ break
+ fi
+ if [ $PUSH_ATTEMPT -eq $MAX_PUSH_ATTEMPTS ]; then
Review Comment:
Style preference - the rest of this script uses `[ ]` notation throughout,
so keeping it consistent. No real word-splitting risk with integer variables.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]