From 1f1cbc48ccfb80b3fe649c0e3193e316a41df4e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bertrand=20N=C3=A9ron?= <bneron@pasteur.fr>
Date: Fri, 18 Aug 2017 17:23:44 +0200
Subject: [PATCH] split pipeline in 2 step build & deploy

---
 .gitlab-ci.yml | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe6de7e..8beb621 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
-- 
GitLab