diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f18b1ff3465540937311db8c2cab5678f95c758b..dace32c1c22797d15cddb78e0a1b5f5fa6534891 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,8 +14,6 @@ setup:
     - apt-get update
     - apt-get install -y zip
   script:
-    - pip install poetry==1.8.2
-    - poetry install
     - ./utilities.sh # Running the script to setup directories and copy files
     - mkdir -p files-from-repos
     - zip -r ./files-from-repos/deployment-files.zip ./frontend/docker/nginx-deployment/
@@ -31,6 +29,8 @@ setup:
 build:
   stage: build
   script:
+    - pip install poetry==1.8.2
+    - poetry install
     - poetry run mkdocs build --strict --verbose --site-dir public
   artifacts:
     paths: