diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d172029d19b58c7462038872c4190eb21ce14039..a06dee37bfa509362f498135f29c1b892ca0cd34 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,8 +22,7 @@ test:
   stage: test
   script:
   - pip install -U sphinx
-  - sphinx-build -b html . public
-  only:
+  - sphinx-build -b html docs/source/ public/
   - branches
   except:
   - master
@@ -32,7 +31,7 @@ pages:
   stage: deploy
   script:
   - pip install -U sphinx
-  - sphinx-build -b html . public
+  - sphinx-build -b html docs/source/ public/
   artifacts:
     paths:
     - public