diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 694691b..b055040 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -33,7 +33,12 @@ jobs: HUGO_DEB="hugo_extended_${HUGO_VERSION}_linux-amd64.deb" HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_DEB}" - if command -v hugo >/dev/null 2>&1 && hugo version | grep -F "v${HUGO_VERSION}" >/dev/null; then + if command -v hugo >/dev/null 2>&1; then + hugo version + exit 0 + fi + + if apt-get update && apt-get install -y --no-install-recommends hugo ca-certificates; then hugo version exit 0 fi @@ -42,7 +47,8 @@ jobs: local proxy_name="$1" shift echo "Trying Hugo download via ${proxy_name}" - env "$@" curl -fsSL --connect-timeout 20 --retry 2 --retry-delay 3 \ + rm -f "/tmp/${HUGO_DEB}" + env "$@" curl -fL --connect-timeout 20 --retry 5 --retry-all-errors --retry-delay 5 \ -o "/tmp/${HUGO_DEB}" "$HUGO_URL" }