.gitlab-ci.yml 866 Bytes
Newer Older
Konrad Völkel's avatar
Konrad Völkel committed
1
stages:
Konrad Völkel's avatar
Konrad Völkel committed
2
  - build
Konrad Völkel's avatar
Konrad Völkel committed
3
  - 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
jupyter-build-html:
Konrad Völkel's avatar
Konrad Völkel committed
14
15
  stage: build
  image: sphinxdoc/sphinx-latexpdf
Konrad Völkel's avatar
Konrad Völkel committed
16
  script:
Konrad Völkel's avatar
Konrad Völkel committed
17
18
    - python3 -V  # Print out python version for debugging
    - pip install virtualenv
Konrad Völkel's avatar
Konrad Völkel committed
19
20
    - virtualenv venv
    - source venv/bin/activate
Konrad Völkel's avatar
Konrad Völkel committed
21
    - pip install --upgrade pip
Konrad Völkel's avatar
Konrad Völkel committed
22
    - pip install -r requirements.txt -v
Konrad Völkel's avatar
Konrad Völkel committed
23
    - alias python=python3  # for jb clean ...
Konrad Völkel's avatar
Konrad Völkel committed
24
25
    - jupyter-book clean .
    - jupyter-book build . --builder html
Konrad Völkel's avatar
Konrad Völkel committed
26
    - jupyter-book build . --builder pdflatex
Konrad Völkel's avatar
Konrad Völkel committed
27
28
29
30
  artifacts:
    paths:
      - _build/

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