diff --git a/README.md b/README.md
index baf7855b46a90f78b49f2a054919941f10c2f7b9..a90a74d21b816d380c2f7d46c2b083679078aa69 100644
--- a/README.md
+++ b/README.md
@@ -27,8 +27,8 @@ test:
   artifacts:
     paths:
     - test
-  except:
-  - master
+  rules:
+    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
 
 pages:
   stage: deploy
@@ -37,8 +37,8 @@ pages:
   artifacts:
     paths:
     - public
-  only:
-  - master
+  rules:
+    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
 ```
 
 ## Building locally