From c6887c65d1fe706fe80405c3b422e3d03e90c943 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Fri, 12 Oct 2018 11:04:14 +0200
Subject: [PATCH] Add auto-building and publishing of documentation

---
 .gitlab-ci.yml | 22 ++++++++++++++++++++++
 docs/conf.py   |  3 +--
 2 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..6246634e0
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,22 @@
+pages:
+  image: davidbergstrom/pycommandcenterenv
+  stage: deploy
+  before_script:
+    - git submodule sync --recursive
+    - git submodule update --init --recursive
+  script:
+    - mkdir build
+    - cd build
+    - cmake ..
+    - make -j 3 library
+    - cd ../build
+    - make html
+    - cd ..
+    - mkdir .public
+    - cp -r docs/_build/html .public
+    - mv .public public
+  artifacts:
+    paths:
+      - public
+  only:
+    - master
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index 926050177..8b78124b4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,8 +13,7 @@
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 
 import sys,os
-# TODO: Change this if you are not building in Windows and in release mode
-sys.path.append(os.path.join(os.getcwd(), "..", "build", "python-api-src", "Release"))
+sys.path.append(os.path.join(os.getcwd(), "..", "build", "python-api-src"))
 
 # -- Project information -----------------------------------------------------
 
-- 
GitLab