diff --git a/gitlab-ci.yml b/gitlab-ci.yml
index 435467fc19cd2afcc3bbd3b67e248d3aac84d06b..7d10af48f0edeef1f7fd69989654a752b1af621f 100644
--- a/gitlab-ci.yml
+++ b/gitlab-ci.yml
@@ -3,10 +3,12 @@ variables:
   CANVAS_COURSE_CODE: 0
   # Update this value to the correct course code
 
-# Used if docker runner is needed, currently we run locally on a designated computer with this installed
-#image: "python:3.7"
-#before_script:
-#  - python3 -m pip install canvasapi
+default:
+  tags:
+    - docker-executor
+  image: "python:3.9"
+  before_script:
+    - python3 -m pip install canvasapi
 
 canvas_push:
   script:
@@ -14,8 +16,5 @@ canvas_push:
       git clone --depth=1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.control.lth.se/regler/canvassync.git 
       python3 canvassync/canvas_sync.py
   stage: deploy
-  only:
-    refs:
-      - master
-    #changes:
-    #  - to_canvas/
+  rules:
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # run only for pushes to main/master