mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-13 23:05:51 +00:00
Move before_script
This commit is contained in:
parent
ba12b0c3f7
commit
e04e274eee
1 changed files with 12 additions and 9 deletions
|
|
@ -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/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue