diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe6de7e9e89d788d578c76e39b172d005179b785..8beb62111bdd048124b1929a598089d25038e009 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,22 @@
+image: registry-gitlab.pasteur.fr/hub-courses/sphinx-env/sphinx:1.4.1
+
+sphinx:
+  stage: build
+  script:
+    - make html
+    - mv build/html/ .
+  artifacts:
+    paths:
+      - html/
 
 pages:
   stage: deploy
-  image: registry-gitlab.pasteur.fr/hub/courses/sphinx-env/sphinx:1.4.1
+  dependencies:
+    - sphinx
   script:
-    - make html
-    - mv build/html/ public/
+    - mv html/ public/
   artifacts:
     paths:
       - public
   only:
-    - master
\ No newline at end of file
+    - master