.gitlab-ci.yml 762 Bytes
Newer Older
Konrad Völkel's avatar
Konrad Völkel committed
1
2
3
stages:
  - build
  - deploy
4
5
6
7
8
9
10
11
12

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
  paths:
    - .cache/pip
    - venv/

Konrad Völkel's avatar
Konrad Völkel committed
13
14
jupyter-build:
  stage: build
Konrad Völkel's avatar
Konrad Völkel committed
15
  image: jupyter/scipy-notebook
Konrad Völkel's avatar
Konrad Völkel committed
16
  script:
Konrad Völkel's avatar
Konrad Völkel committed
17
18
19
20
21
    - python3 -V  # Print out python version for debugging
    - pip install virtualenv
    - virtualenv venv
    - source venv/bin/activate
    - pip install -r requirements.txt -v
Konrad Völkel's avatar
Konrad Völkel committed
22
23
    - jupyter-book clean .
    - jupyter-book build . --builder html
Konrad Völkel's avatar
Konrad Völkel committed
24
    - jupyter-book build . --builder pdflatex
Konrad Völkel's avatar
Konrad Völkel committed
25
26
27
28
  artifacts:
    paths:
      - _build/

29
30
pages:
  stage: deploy
Konrad Völkel's avatar
Konrad Völkel committed
31
  image: busybox:latest
32
  script:
Konrad Völkel's avatar
Konrad Völkel committed
33
    - mv _build/html public
Konrad Völkel's avatar
Konrad Völkel committed
34
    - mv _build/latex/*.pdf public/
35
36
  artifacts:
    paths:
Konrad Völkel's avatar
Konrad Völkel committed
37
      - public
38
  rules:
Konrad Völkel's avatar
Konrad Völkel committed
39
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH