diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 766fb46582d65667c8f357a047a5ddaeae6431b4..bf81636ac1b6c82f68f6679dcc32d04eb429cd5e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,40 +2,42 @@
 # This file is a template, and might need editing before it works on your project.
 image: python:latest
 
-before_script:
-  - python3 -V                                   # Print out python version for debugging
-
 stages:
   - build
   - test
+  - doc_build
   - deploy
 
 navipy_install:
   stage: build
+  
+  before_script:
+    - python3 -V # Print out python version for debugging
+  
   script:
+  - pip3 install virtualenv
+  - virtualenv venv
+  - source venv/bin/activate
   - python3 setup.py bdist_wheel
 
 flake8:
   stage: test
   script:
-  - pip3 install --user tox flake8
+  - pip3 install tox flake8
   - python3 -m flake8 navipy/*.py
   
 navipy_unittest:
   stage: test
+    
   script:
-  - pip3 install --user networkx
   - python3 -m unittest discover navipy
+  
 
 doc_build:
-  stage: deploy
+  stage: doc_build
   script:
-  - pip3 install --user sphinx sphinx-rtd-theme
-  - cd doc ; make html
-  - mv build/html/ ../public/
-  - ls build/html/
-  artifacts:
-    paths:
-    - public
+  - pip3 install --user sphinx sphinx_rtd_theme
+  - cd doc ; make html  
+  
   only:
   - master