From df8214846589da3208f0ee5488ca8308f1790ece Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Wed, 16 May 2018 15:56:56 +0200
Subject: [PATCH] try to publish doc via gitlab pages

---
 .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 12 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a942c57e..d5a5a5ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 stages:
     - build_and_tests
-    - clippy
     - fmt
+    - clippy
     - publish
     
 before_script:
@@ -37,29 +37,29 @@ build_and_tests:nightly:
   when: manual
   allow_failure: true
   
-clippy:
-  stage: clippy
+fmt:
+  stage: fmt
   image: rustlang/rust:nightly
   tags:
     - redshift-rs-nightly
   before_script:
     - export PATH="$HOME/.cargo/bin:$PATH"
-    - cargo install --force clippy --verbose
+    - cargo install --force rustfmt-nightly
   script:
-    - cargo clippy --all -- -D warnings --verbose
-  allow_failure: true  
-  
-fmt:
-  stage: fmt
+    - cargo fmt -- --check
+  allow_failure: true
+
+clippy:
+  stage: clippy
   image: rustlang/rust:nightly
   tags:
     - redshift-rs-nightly
   before_script:
     - export PATH="$HOME/.cargo/bin:$PATH"
-    - cargo install --force rustfmt-nightly
+    - cargo install --force clippy --verbose
   script:
-    - cargo fmt -- --check
-  allow_failure: true
+    - cargo clippy --all -- -D warnings --verbose
+  allow_failure: true  
 
 publish:crate:
   stage: publish
@@ -73,4 +73,21 @@ publish:crate:
   only:
     - tags
   allow_failure: false
+  when: manual
+
+pages:
+  stage: publish
+  tags:
+    - redshift-rs-stable
+  before_script:
+    - export PATH="$HOME/.cargo/bin:$PATH"
+  script:
+    - cargo doc
+    - mv target/doc public
+    - ls public
+  artifacts:
+    untracked: true
+    paths:
+      - public
+  allow_failure: true
   when: manual
\ No newline at end of file
-- 
GitLab