From c4f499b497c0a30d5e34f0a6ea4e7d2309a5a001 Mon Sep 17 00:00:00 2001
From: Alexis Durgnat <alexis.durgnat@hesge.ch>
Date: Wed, 3 Nov 2021 11:43:19 +0100
Subject: [PATCH] Export doc after building it

---
 Scripts/entrypoint.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Scripts/entrypoint.sh b/Scripts/entrypoint.sh
index 007faa8..f079dcc 100644
--- a/Scripts/entrypoint.sh
+++ b/Scripts/entrypoint.sh
@@ -93,7 +93,12 @@ function make_python_docs() {
         echo $SOPT
     fi
     echo -e "${GRN}Running sphinx-build in html mode.${NC}"
-    cd $SBOX_PYWR/docs/ && SPHINXOPTS=$SOPT make $MODE
+    cd $SBOX_PYWR/docs/ && \
+        SPHINXOPTS=$SOPT make $MODE && \
+        mkdir -p /build/wrapper/docs/ && \
+        rm -rf /build/wrapper/docs/* && \ 
+        cp -r $SBOX_PYWR/docs/_build/$MODE/* /build/wrapper/docs/
+    echo -e "${YLW}Documentation built : ${GRN}./build/wrapper/docs/index.html${NC}"
 }
 
 function clean_python_doc() {
-- 
GitLab