Merge branch 'main' into 'publish'

Move before_script

See merge request interactivetextbooks-citg/jupyter-book-manual!25
This commit is contained in:
Caspar Jungbacker 2023-06-26 19:46:16 +02:00
commit 9d4df9afb6

View file

@ -15,22 +15,19 @@ cache:
paths:
- .cache/pip
# Before running other jobs, setup the Anaconda environment
before_script:
- python -V
- conda env create -f environment.yml
- conda init bash
- source ~/.bashrc
- conda activate jupyter-book-env
# This job tests if the book compiles gracefully after a new addition
test-build:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"
before_script:
- python -V
- conda env create -f environment.yml
- conda init bash
- source ~/.bashrc
- conda activate jupyter-book-env
script:
- pip install -r requirements.txt
- jupyter-book clean book/
- jupyter-book build book/
@ -38,6 +35,12 @@ build-book:
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "publish" && $CI_PIPELINE_SOURCE == "push"
before_script:
- python -V
- conda env create -f environment.yml
- conda init bash
- source ~/.bashrc
- conda activate jupyter-book-env
script:
- jupyter-book clean book/
- jupyter-book build book/