From 0f577a5e6483ac7a5a5d72db2fe7567e4bc87231 Mon Sep 17 00:00:00 2001 From: Caspar Jungbacker Date: Mon, 8 May 2023 14:07:27 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fffe30..70bcc8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,8 +23,9 @@ before_script: # This job tests if the book compiles gracefully after a new addition test-build: stage: test - only: - - main + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push" script: - pip install -r requirements.txt - jupyter-book clean book/