diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9cefd2216b27279684add85bc103a475f00f9d6..8006e8d3f71ec5e27a2fb5da0a582755946479cb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -158,10 +158,11 @@ production-deploy:
 
     - ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$prod_floating_ip sudo mount /dev/vdb1 /var/lib/mysql
     - ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$prod_floating_ip sudo systemctl start mariadb
-
-  when: manual
+  needs:
+    - job: tf-apply
+      artifacts: true
   rules:
-    - if: '$TARGET_ENV != "dev"'
+    - if: '$TARGET_ENV == "production"'
 
 clean-up:
   stage: cleanup