diff --git a/.gitlab/ci/deploy.yml b/.gitlab/ci/deploy.yml
index cbb5c9e3bf62eaa4862d595439b2b87366f98130..8eaa42a9bb49c1df97e412e6af2ea07487b331c2 100644
--- a/.gitlab/ci/deploy.yml
+++ b/.gitlab/ci/deploy.yml
@@ -82,8 +82,9 @@ deploy:staging:infra:
   environment:
     name: staging
     url: https://staging.moderation.holi.social
-  only:
-    - main
+  rules:
+    - if: $CI_COMMIT_BRANCH == "main"
+      when: on_success
 
 ###
 # PRODUCTION
@@ -94,5 +95,6 @@ deploy:production:infra:
   environment:
     name: production
     url: https://moderation.holi.social
-  only:
-    - production
\ No newline at end of file
+  rules:
+    - if: $CI_COMMIT_BRANCH == "production"
+      when: on_success
diff --git a/.gitlab/ci/prepare.yml b/.gitlab/ci/prepare.yml
index 74df4b04380d156dd8977bd123f192fa9fc07f3e..b9ee33851e459727693609ec21fc8a9d024491fd 100644
--- a/.gitlab/ci/prepare.yml
+++ b/.gitlab/ci/prepare.yml
@@ -6,8 +6,10 @@ apps:prepare:
     - corepack enable
     - corepack yarn install --immutable
   rules:
-    # Execute step if yarn.lock was changed or cache is missing
-    # Inspired by https://gitlab.com/gitlab-org/gitlab/-/issues/244932#note_1727726890
+    # always run when triggered manually
+    - if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
+      when: on_success
+    # only run on specific file changes when triggered by git push
     - if: $CI_COMMIT_BRANCH
       changes: 
       - yarn.lock