Skip to content

Commit

Permalink
Add docu sync for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Jul 9, 2023
1 parent 56a4cbf commit 98bebea
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/scripts/sync_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,21 @@ if [[ $EVENT == "push" ]]; then
elif [[ $EVENT == "release" ]]; then
git commit -m "Sync docs for release ${COMMIT_URL}/releases/tag/${TAG_NAME}"
fi
git pull
git push https://${TOKEN}@${REPO_URL}

MAX_RETRIES=5
DELAY=5
retry=0

while ((retry < MAX_RETRIES))
do
git push https://${TOKEN}@${REPO_URL} && break
retry=$((retry + 1))
git pull --rebase
sleep $DELAY
done

if ((retry == MAX_RETRIES))
then
echo "Failed to push after $MAX_RETRIES attempts. Exiting with 1."
exit 1
fi

0 comments on commit 98bebea

Please sign in to comment.