diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b88637cbb21c51fc817a723135c77fc0f31e8635..4613dc013a4f16ee9d8a9a58656701f61afc0af2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -182,7 +182,7 @@ build-spack-env-on-runner:
     # run installation script
     - . install_spack_env.sh $CI_PROJECT_DIR $SPACK_VERSION $CI_PROJECT_DIR $SPACK_DEV_ENV $SPACK_PATH_GITLAB
   after_script:
-    - mkdir -p .R/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
+    - mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
       # for succesfully installed packages: keep the spack logs for any package modified during this CI job
     - PKG_DIR=$CI_PROJECT_DIR/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
     - if cd $PKG_DIR; then find . \( -name ".spack" -o -name ".build" -o -name ".spack_test_results" \) -exec cp -r --parents "{}" $CI_PROJECT_DIR/spack_logs/installed \;; fi