diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c7b08187b7ad474ab82f3b4f8c8a9f5ae27235a9..c5da6c60b7f4608b3e52a68c1ac7e68767227e2e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,17 +1,14 @@
-image: lbmc/pandoc:2.11
-
-stages:
-  - pages
+# This file is a template, and might need editing before it works on your project.
+# Full project: https://gitlab.com/pages/plain-html
 
 pages:
-  stage: pages
+  stage: deploy
+  image: lbmc/pandoc:2.11
   script:
+    - mkdir .public
     - make
   artifacts:
     paths:
       - public
-  only:
-    - master
-  environment:
-    name: ${CI_JOB_NAME}
-
+  rules:
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH