diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3743d242e7f158629e8803e02f3949e05a1f177e..86fa5d96e91c0c776bf19a7e8c20ee5bec43635f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -145,7 +145,10 @@ deploy:
     name: registry.ostc-eu.org/ostc/oniro/docs-builder:latest
   stage: deploy
   script:
-    # We are in the root of the git-repo workspace.
+    # We are in the root of the git-repo workspace. Because
+    # .oniro-repo-workspace uses GIT_STRATEGY=none, the workspace is not
+    # cleaned automatically.
+    - rm -rf aggregated
     - git clone https://user:$CI_ONIRO_AGGREGATED_DOCS_TOKEN@gitlab.eclipse.org/eclipse/oniro-core/oniro-readthedocs-aggregated.git aggregated
     - find aggregated -maxdepth 1 -not -path aggregated/.git -not -path aggregated -exec rm -rvf {} \;
     - tar -c --dereference -C docs --exclude ./.git --exclude ./.gitlab-ci.yml . | tar -x -C aggregated