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/