From c2b300e12b9ffe373c53290d75449c7c06f0ed7d Mon Sep 17 00:00:00 2001
From: Manuel Kieweg <mail@manuelkieweg.de>
Date: Thu, 8 Oct 2020 19:23:08 +0100
Subject: [PATCH] first try mdbook

---
 .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9018fe1a1..147afdc43 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@ variables:
 stages:
   - test
   - compliance
-  - build
+  - doc
 
 before_script:
   - git config --global url."https://$GO_MODULES_USER:$GO_MODULES_ACCESS_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
@@ -41,7 +41,7 @@ code-quality:
     paths:
       - gl-code-quality-report.json
 
-Documentation:
+documentation:pdf:
   before_script:
     - pwd
   image:
@@ -60,6 +60,32 @@ Documentation:
     paths:
     - documentation/design/documentation.pdf
 
+documentation:static:
+  before_script:
+      - cargo install mdbook
+  image:
+    name: rust/latest
+  stage: doc
+  rules:
+    - if: $CI_DEFAULT_BRANCH
+  script:
+  - mdbook build documentation/design --dest-dir public
+  artifacts:
+    paths:
+      - public
+    expire_in: 1 week
+
+documentation:test:
+  before_script:
+      - cargo install mdbook
+  image:
+    name: rust/latest
+  stage: doc
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+  script:
+  - mdbook build documentation/design --dest-dir public
+
 sast:
   variables:
     SAST_ANALYZER_IMAGE_TAG: '2'
-- 
GitLab