The Drone runner environment does not have `pip` or `mkdocs` on PATH even when installed via the Docker image. Use `pip3` explicitly and invoke mkdocs as `python3 -m mkdocs` to ensure reliable execution. Also add --break-system-packages to the fallback install.
22 lines
487 B
Bash
22 lines
487 B
Bash
#!/usr/bin/env bash
|
|
echo " "
|
|
echo "======================="
|
|
echo " "
|
|
echo "Generating Documentation..."
|
|
echo " "
|
|
|
|
if ! command -v mkdocs &> /dev/null; then
|
|
echo "Installing mkdocs-material..."
|
|
pip3 install --quiet --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
|
fi
|
|
|
|
echo "Building static site..."
|
|
python3 -m mkdocs build --strict
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Documentation built successfully. Output: site/"
|
|
else
|
|
echo "Documentation build failed."
|
|
exit 1
|
|
fi
|