From 935d7d39f46881504a9b3f1122fabca9fc5d1e4e Mon Sep 17 00:00:00 2001 From: Thomas Lambert <t.lambert@uliege.be> Date: Thu, 2 Jun 2022 16:14:20 +0200 Subject: [PATCH] ci: add automatic build and deploy --- .gitlab-ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b6405f6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,50 @@ +--- + +stages: + - build + - deploy + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +.global_tag: &global_tag_def + tags: + - latex + +# Compile latex presentation +tex-compile: + <<: *global_tag_def + stage: build + image: aergus/latex + script: + # - git submodule init + # - git submodule update + - latexmk -pdf -f -interaction=nonstopmode *.tex + artifacts: + name: "$CI_PROJECT_NAME-$CI_COMMIT_SHA" + paths: + - "*.pdf" + expire_in: 12 hours + only: + - main + - dev + +# Expose pdf outputs publicly +pages: + <<: *global_tag_def + stage: deploy + script: + - mkdir public + - cp *.pdf public + artifacts: + paths: + - public + expire_in: 12 hours + only: + - main + + +# cache all auxilliary files to speed up compilation +cache: + untracked: true + key: "$CI_BUILD_NAME" -- GitLab