From c0b5a626886e25f63f28e2be4eb175d9ad246677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20V=C3=B6lkel?= <konrad.voelkel@hhu.de> Date: Wed, 5 Apr 2023 20:46:38 +0000 Subject: [PATCH] automagically building web+pdf versions --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..920268e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +stages: + - build + - deploy + +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +cache: + paths: + - .cache/pip + - venv/ + +jupyter-build: + stage: build + image: sphinxdoc/sphinx-latexpdf + script: + - python3 -V # Print out python version for debugging + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate + - pip install --upgrade pip + - pip install -r requirements.txt -v + - alias python=python3 # for jb clean ... + - jupyter-book clean . + - jupyter-book build . --builder html + - jupyter-book build . --builder pdflatex + artifacts: + paths: + - _build/ + +pages: + stage: deploy + image: busybox:latest + script: + - mv _build/html public + - mv _build/latex/ds-skript.pdf public/ + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -- GitLab