diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 94db64f112d2e1f011f15acbd462f9abd3ff0212..f18a7c4695e0bc507dfd335d73030636c05698a2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -94,7 +94,7 @@ sphinx:
   rules:
     - if: $CI_COMMIT_TAG == null
   script:
-    - poetry install --with docs
+    - poetry install --extras docs
     - apt update
     - apt -y install pandoc
     - sphinx-build -W --keep-going docs/ docs/_build