diff --git a/Gitlab-hook-script.md b/Gitlab-hook-script.md index cb54215..14b279d 100644 --- a/Gitlab-hook-script.md +++ b/Gitlab-hook-script.md @@ -27,7 +27,7 @@ deploy_challenge() { git -C "$REPO" commit -m "Let's Encrypt challenge" git -C "$REPO" push sleep 20 - while ! curl --output /dev/null --silent --head --fail "http://$DOMAIN/.well-known/acme-challenge/$TOKEN_FILENAME"; do + while ! curl --output /dev/null --silent --head --fail "https://$DOMAIN/.well-known/acme-challenge/$TOKEN_FILENAME"; do echo sleeping sleep 5 done @@ -35,7 +35,8 @@ deploy_challenge() { clean_challenge() { TOKEN_FILENAME="$2" - git -C "$REPO" reset --hard HEAD~ + git -C "$REPO" reset HEAD~ + rm -r "$REPO/public/" git -C "$REPO" push --force-with-lease }