fix: install compatible hugo in ci
All checks were successful
Deploy Hugo Blog to k3s / build-and-deploy (push) Successful in 2m14s
All checks were successful
Deploy Hugo Blog to k3s / build-and-deploy (push) Successful in 2m14s
This commit is contained in:
@@ -35,15 +35,8 @@ 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; 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
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends ca-certificates curl
|
||||
|
||||
download_hugo() {
|
||||
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
|
||||
|
||||
dpkg -i "/tmp/${HUGO_DEB}"
|
||||
hugo version
|
||||
hugo version | grep "v${HUGO_VERSION}"
|
||||
|
||||
- name: Hugo Build
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user