From 0d93a954ee4fdbf9bfe9df4e026ef93732618924 Mon Sep 17 00:00:00 2001 From: Luc Date: Sun, 20 Jul 2025 19:59:02 +0200 Subject: [PATCH] monolang/mkdocs-git: update Added activation of python venv and comments. --- monolang/mkdocs-git | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/monolang/mkdocs-git b/monolang/mkdocs-git index 60a65d9..27d1b54 100644 --- a/monolang/mkdocs-git +++ b/monolang/mkdocs-git @@ -1,6 +1,18 @@ #!/bin/sh +# Redirect standard error to standard output exec 2>&1 + +# Activate the Python virtual environment +source ${VIRTUAL_ENV}/bin/activate + +# Check if the /mkdocs/repo directory exists +# If it does not exist, clone the repository from the specified GIT_REPO_URL find /mkdocs/repo || git clone $GIT_REPO_URL /mkdocs/repo + +# Change directory to the cloned repository and pull the latest changes cd /mkdocs/repo && git pull + +# Build mkdocs using the configuration file located at /mkdocs/repo/mkdocs.yml +# The output will be directed to /usr/share/nginx/html exec mkdocs build -f /mkdocs/repo/mkdocs.yml -d /usr/share/nginx/html \ No newline at end of file