mirror of
https://gitlab.com/mathezirkel/content/matboj-regelwerk
synced 2024-12-22 14:01:45 +01:00
set up CI
This commit is contained in:
parent
52602ac050
commit
9d6fec1055
2 changed files with 48 additions and 0 deletions
14
.ci/build_document.sh
Normal file
14
.ci/build_document.sh
Normal 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
34
.gitlab-ci.yml
Normal 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
|
Loading…
Reference in a new issue