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
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:
parent
8789fcbe94
commit
f2abd94aa6
1 changed files with 22 additions and 0 deletions
|
|
@ -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:"
|
||||
|
|
|
|||
Loading…
Reference in a new issue