diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..8f956b87f42f78a3928fcc792afa8f362752903f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+public
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9c09903837222d93b805b8071d6e706b489cb524..bfe27afdf030c54f86e26e86250b6911499fb844 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,22 @@
 image: python:3.8-buster
 
 before_script:
-  - pip install mkdocs
-  # Add your custom theme if not inside a theme_dir
-  # (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
-  # - pip install mkdocs-material
+  - pip install -r requirements.txt
+
+test:
+  stage: test
+  script:
+  - mkdocs build --strict --verbose --site-dir test
+  artifacts:
+    paths:
+    - test
+  except:
+  - master
 
 pages:
+  stage: deploy
   script:
-  - mkdocs build
-  - mv site public
+  - mkdocs build --strict --verbose
   artifacts:
     paths:
     - public
diff --git a/mkdocs.yml b/mkdocs.yml
index 785f1528969528f6eb4940f883106a524b241afb..284d9853c395de602ce981b02894b05246984e16 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,2 +1,3 @@
 site_name: My Docs by GitLab Pages
 site_url: https://pages.gitlab.io/mkdocs
+site_dir: public
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c18b9e9414b8f5471a2d438f31088030dfd5edb8
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
+# Documentation static site generator & deployment tool
+mkdocs>=1.1.2
+
+# Add your custom theme if not inside a theme_dir
+# (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
+#  mkdocs-material>=5.4.0