diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6bb50bbbad2024704aa9d6c0d31697c0f3c34e48..346e511178351b29df75f792360cefeeaae4bd57 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -56,6 +56,12 @@ test-centos7:
   - python3.6 manage.py test
   - coverage run --source='.' manage.py test
   - coverage report
+  - 'mkdir -p ../public/$CI_COMMIT_REF_NAME'
+  - pip install sphinx sphinx-argparse sphinxcontrib.bibtex sphinx_rtd_theme
+  - cd docs
+  - make html
+  - 'mv build/html/ ../../public/$CI_COMMIT_REF_NAME'
+
 deploy-webserver-targetcentric:
   image: python:3.5
   stage: deploy
@@ -121,20 +127,4 @@ deploy-webserver-production:
     - ansible-playbook -vvv -i ./hosts_release deploy.yaml 
       --extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_release galaxy_base_url=$GALAXY_BASE_URL_release galaxy_apikey=$GALAXY_APIKEY_release galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_release secret_key=$SECRET_KEY_release dbname=$DBNAME_release dbuser=$DBUSER_release dbpassword=$DBPASSWORD_release dbhost=$DBHOST_release dbport=$DBPORT_release http_port=$HTTP_PORT_release branch=$CI_COMMIT_REF_NAME  gacode=$GACODE_release"
   only:
-    - release
-pages:
-  image: python:3.6
-  stage: deploy
-  script:
-  - 'mkdir -p public/$CI_COMMIT_REF_NAME'
-  - pip install sphinx sphinx-argparse sphinxcontrib.bibtex sphinx_rtd_theme
-  - pip install -r requirements-dev.txt
-  - pip install .
-  - cd doc
-  - make html
-  - 'mv build/html/ ../public/$CI_COMMIT_REF_NAME'
-  artifacts:
-    paths:
-    - public
-  only:
-  - master
+    - release
\ No newline at end of file