From 6d6f5a08ad43a3e718ac3c686cf8ccada3740ccd Mon Sep 17 00:00:00 2001
From: Yoann Schneider <yschneider@teklia.com>
Date: Mon, 6 May 2024 09:34:43 +0000
Subject: [PATCH] Build doc tox

---
 .gitlab-ci.yml | 6 +++---
 tox.ini        | 8 +++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 904ad7bf..5871b91a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,7 @@ test:
     - schedules
 
   script:
-    - tox -- -v
+    - tox -e teklia-dan -- -v
 
 docker-build:
   stage: build
@@ -71,10 +71,10 @@ docker-build:
       - public
 
   before_script:
-    - pip install -e .[docs]
+    - pip install tox
 
   script:
-    - mkdocs build --strict --verbose
+    - tox -e doc
 
 docs-build:
   extends: .docs
diff --git a/tox.ini b/tox.ini
index ffb845de..c2b943f0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 env_list =
-    teklia-dan
+    teklia-dan, doc
 minversion = 4.6.4
 
 [testenv]
@@ -14,5 +14,11 @@ deps =
 commands =
     pytest {tty:--color=yes} {posargs}
 
+[testenv:doc]
+extras = docs
+
+commands =
+  mkdocs build --clean --verbose --strict
+
 [pytest]
 testpaths= tests
-- 
GitLab