From 163f9b5203fd04693dad895df071f5a05cd9ba6c Mon Sep 17 00:00:00 2001
From: Pieter van Staden <pieter@bob.co.za>
Date: Mon, 5 May 2025 13:11:38 +0200
Subject: [PATCH] INFRASTRUCTURE :: Resolve the issue causing the pipeline to
 trigger twice on a single push to the dev branch.

---
 .gitlab-ci.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3be6f28..143a6ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,8 +10,6 @@ stages:
 
 deploy:
   stage: deploy
-  only:
-    - dev
   before_script:
     - AWS_ACCESS_KEY_ID_KEY=$(echo "$CI_COMMIT_BRANCH"_"AWS_ACCESS_KEY_ID")
     - AWS_ACCESS_KEY_ID=$(eval echo -e "\$$AWS_ACCESS_KEY_ID_KEY")
@@ -22,6 +20,9 @@ deploy:
   script:
     - ./make-zip.sh
     - aws s3 cp bobgo-magento-plugin.zip s3://bobgo-s3-magento-plugin-dev/ --region=af-south-1
+  rules:
+    - if: '$CI_COMMIT_BRANCH == "dev" && $CI_COMMIT_TAG == null'
+      when: always
 
 tag_deploy:
   stage: tag_deploy
-- 
GitLab