diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 904ad7bf5939d56caed17b6ca1b3572df5408ec3..5871b91ad483a25ace1ebf02c79a7805b7d099af 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 ffb845de95a7750ccdf7d1fe5e3ecfde4bc8cd22..c2b943f0ef7107b72420eb5f88a324b8bfc4a473 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