From 9d6fec10559387d5dc9adf4597dafcf835a03863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 2 Oct 2022 10:08:35 +0200 Subject: [PATCH] set up CI --- .ci/build_document.sh | 14 ++++++++++++++ .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .ci/build_document.sh create mode 100644 .gitlab-ci.yml diff --git a/.ci/build_document.sh b/.ci/build_document.sh new file mode 100644 index 0000000..41b47ab --- /dev/null +++ b/.ci/build_document.sh @@ -0,0 +1,14 @@ +set -e +echo "Building document" +make pdf +mkdir public +mv build/Matboj_Regelwerk.pdf public +mv build/Matboj_Regelwerk.log public +cd public/ +if ! command -v tree &> /dev/null +then + echo "No tree utility found, skipping making tree" +else + tree -H '.' -I "index.html" -D --charset utf-8 -T "$course" > index.html +fi + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..987bc3a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +stages: + - build + - pages + +default: + tags: + - latex + +build-document: + stage: build + script: + - .ci/build_document.sh + variables: + GIT_SUBMODULE_STRATEGY: recursive + artifacts: + paths: + - public/ + only: + - tags + - branches + # - merge_requests + + +pages: + stage: pages + artifacts: + paths: + - public/ + script: + - echo "Deploying to GitLab pages" + - test -f public/Matboj_Regelwerk.pdf + only: + - master + - main