diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b379c0f89a03458140fa769a384c25d930ee52cd..8a38a336e389de81c169fe04f42f4d7b5ecd135a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,10 +45,10 @@ Deploy:
   stage: Deploy
   before_script:
     - cd ./Go/
+    - docker compose down
     - apk add --no-cache curl bash
     - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash > /dev/null 2>&1
   script:
     - docker compose up globeboard -d
-  after_script:
-    - cd ./Go/
-    - docker compose down
\ No newline at end of file
+  only:
+    - main
\ No newline at end of file