diff options
author | 2024-08-14 20:17:06 +0100 | |
---|---|---|
committer | 2024-08-14 20:17:06 +0100 | |
commit | 5639f58b06f73c1060e993fe581fd902f2ad8e76 (patch) | |
tree | 8112f88e87f5994608a51a5db5dc2cca7006cae7 | |
parent | Install mblaze utilities (diff) |
Add builder script for docs
-rw-r--r-- | docs/builder.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/builder.sh b/docs/builder.sh new file mode 100644 index 0000000..06c5893 --- /dev/null +++ b/docs/builder.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Ensure Poetry is accessible in the current session +export PATH=“/opt/render/project/poetry/bin:$PATH” + +# Check for Poetry, and install it if not found +if ! command -v poetry &> /dev/null; then + echo “Poetry not found. Installing Poetry...” + curl -sSL https://install.python-poetry.org | python3 - + # Add Poetry to PATH for the current session + export PATH=“$HOME/.local/bin:$PATH” +else + echo “Poetry found: $(poetry --version)” +fi + +# Check that Poetry was successfully installed and is working +poetry --version + +if [ $? -ne 0 ]; then + echo “Poetry installation failed.” + exit 1 +fi + +# Install dependencies using Poetry +echo “Running poetry install...” + +poetry install --with docs + +# Run the build process for mkdocs +echo “Running build process with Yarn...” + +poetry run mkdocs build |