diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 607022ff77f1765e336fc7b33e2d3f18e81ad42b..a845b746dbeaf718233b9eb6e03e315d277df34f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -69,7 +69,7 @@ deploy preview:
     - .deploy eos
   stage: deploy
   rules:
-    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+    - if: $CI_PROJECT_NAMESPACE == 'cmsgemonline/gem-ops' && $CI_PIPELINE_SOURCE == 'merge_request_event'
   environment:
     name: preview-$CI_MERGE_REQUEST_IID
     url: https://cmsgemonline.web.cern.ch/doc/preview-$CI_MERGE_REQUEST_IID
@@ -83,7 +83,7 @@ deploy preview:stop:
   extends: .deploy eos:stop
   stage: deploy
   rules:
-    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
+    - if: $CI_PROJECT_NAMESPACE == 'cmsgemonline/gem-ops' && $CI_PIPELINE_SOURCE == 'merge_request_event'
       when: manual
       allow_failure: true
   environment: