diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73b73af1fb6b6e8a88f1bd41678f5823315487c8..bc451b58fa06624a1f3610eb2bd59d19042ff6ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,7 +31,7 @@ bundle_and_test:
       - public
     expire_in: 2 days
   only:
-    - master
+    - $CI_DEFAULT_BRANCH
 
 # test_api:
 #   stage: test
@@ -55,4 +55,4 @@ pages:
       - public
     expire_in: 2 days
   only:
-    - master
+    - $CI_DEFAULT_BRANCH