set up CI

This commit is contained in:
Maximilian Keßler 2022-10-02 10:08:35 +02:00
parent 52602ac050
commit 9d6fec1055
Signed by: max
GPG Key ID: BCC5A619923C0BA5
2 changed files with 48 additions and 0 deletions

14
.ci/build_document.sh Normal file
View File

@ -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

34
.gitlab-ci.yml Normal file
View File

@ -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