diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a246fc1d2545b023fe89975c02eb0f849a29854..e17e93fe4edcde35009b405c96d616026242f069 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,9 +47,10 @@ deploy_doc_develop:
     - webserver
   variables:
     GIT_STRATEGY: none
+  pre-script:
+    - usermod -a -G www-data gitlab-runner
   script:
-    - sudo mv doc/html /html
-    - chown 33:33 /html -R
+    - mv doc/html /html
 
 deploy_doc_branch:
   except:
@@ -63,7 +64,8 @@ deploy_doc_branch:
     - webserver
   variables:
     GIT_STRATEGY: none
+  pre-script:
+    - usermod -a -G www-data gitlab-runner
   script:
-    - sudo mv doc/html /html/branch/$CI_COMMIT_BRANCH
-    - chown 33:33 /html/branch/$CI_COMMIT_BRANCH -R
+    - mv doc/html /html/branch/$CI_COMMIT_BRANCH