fix: install compatible hugo in ci
All checks were successful
Deploy Hugo Blog to k3s / build-and-deploy (push) Successful in 2m14s

This commit is contained in:
luochen570
2026-06-02 08:55:10 +08:00
parent a2aec46cc0
commit 63d9451483

View File

@@ -35,15 +35,8 @@ jobs:
HUGO_DEB="hugo_extended_${HUGO_VERSION}_linux-amd64.deb" HUGO_DEB="hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_DEB}" HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_DEB}"
if command -v hugo >/dev/null 2>&1; then apt-get update
hugo version apt-get install -y --no-install-recommends ca-certificates curl
exit 0
fi
if apt-get update && apt-get install -y --no-install-recommends hugo ca-certificates; then
hugo version
exit 0
fi
download_hugo() { download_hugo() {
local proxy_name="$1" local proxy_name="$1"
@@ -62,7 +55,7 @@ jobs:
NO_PROXY=localhost,127.0.0.1,.svc,.cluster.local,gitea-http.gitea.svc.cluster.local,git.luochen570.cn,mihomo.mihomo.svc.cluster.local NO_PROXY=localhost,127.0.0.1,.svc,.cluster.local,gitea-http.gitea.svc.cluster.local,git.luochen570.cn,mihomo.mihomo.svc.cluster.local
dpkg -i "/tmp/${HUGO_DEB}" dpkg -i "/tmp/${HUGO_DEB}"
hugo version hugo version | grep "v${HUGO_VERSION}"
- name: Hugo Build - name: Hugo Build
run: | run: |