diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f5067eb735269df823ceeebaf7a407e93d56eb66..f71c697c77cf1757676662db4978cc2fe01e9ce2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,10 @@ default:
   before_script:
     - source /opt/miniconda3/etc/profile.d/conda.sh
 
+workflow:
+  rules:
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+
 build-and-publish:
   stage: build-and-publish
   rules: