fix(docs): fix Hugo installation path detection
Some checks failed
Security Scan / Security Analysis (push) Waiting to run
Security Scan / Native Library Security (push) Waiting to run
Checkout test / test (push) Successful in 5s
CI/CD Pipeline / Test (push) Failing after 1s
CI/CD Pipeline / Dev Compose Smoke Test (push) Has been skipped
CI/CD Pipeline / Build (push) Has been skipped
CI/CD Pipeline / Test Scripts (push) Has been skipped
CI/CD Pipeline / Test Native Libraries (push) Has been skipped
Documentation / build-and-publish (push) Has been cancelled
CI/CD Pipeline / Docker Build (push) Has been skipped

- Find Hugo binary dynamically after dpkg install

- Create symlink to /usr/bin/hugo for consistency
This commit is contained in:
Jeremie Fraeys 2026-02-23 11:22:33 -05:00
parent 8789fcbe94
commit f2abd94aa6
No known key found for this signature in database

View file

@ -58,6 +58,28 @@ jobs:
wget -q -O /tmp/hugo.deb "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
sudo dpkg -i /tmp/hugo.deb || sudo apt-get install -f -y
# Find where hugo was installed
HUGO_PATH=$(which hugo || echo "")
if [ -z "$HUGO_PATH" ]; then
# Check common locations
for path in /usr/bin/hugo /usr/local/bin/hugo /opt/hugo/bin/hugo; do
if [ -f "$path" ]; then
HUGO_PATH="$path"
break
fi
done
fi
if [ -z "$HUGO_PATH" ]; then
echo "ERROR: Hugo not found after installation" >&2
exit 1
fi
# Create symlink to standard location if needed
if [ "$HUGO_PATH" != "/usr/bin/hugo" ]; then
sudo ln -sf "$HUGO_PATH" /usr/bin/hugo
fi
# Verify the installed version
echo ""
echo "Installed Hugo version:"