From 252f79d5e454272b0fd5fe6da9689b4708c9a102 Mon Sep 17 00:00:00 2001
From: bobarna <bobarna@sch.bme.hu>
Date: Mon, 19 Sep 2022 11:26:48 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 38 +++++++++++++++-----------------------
 1 file changed, 15 insertions(+), 23 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 427cb81..1a9ec6f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,26 +1,18 @@
-# This file is a template, and might need editing before it works on your project.
-# To contribute improvements to CI/CD templates, please follow the Development guide at:
-# https://docs.gitlab.com/ee/development/cicd/templates.html
-# This specific template is located at:
-# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/LaTeX.gitlab-ci.yml
-
----
-variables:
-  # Feel free to choose the image that suits you best.
-  # blang/latex:latest ... Former image used in this template. No longer maintained by author.
-  # listx/texlive:2020 ... The default, referring to TexLive 2020. Current at least to 2021-02-02.
-
-  # Additional alternatives with high Docker pull counts:
-  # thomasweise/docker-texlive-full
-  # thomasweise/texlive
-  # adnrv/texlive
-  LATEX_IMAGE: listx/texlive:2020
+compile_pdf:
+  stage: build
+  image: timnn/texlive  # use a Docker image for LaTeX from https://hub.docker.com/
+  script: pdflatex main.tex  # build the pdf just as you would on your computer
+  artifacts:
+    paths: 
+      - main.pdf  # instruct GitLab to keep the main.pdf file
 
-build:
-  image: $LATEX_IMAGE
+pages:
+  stage: deploy
   script:
-    - latexmk -pdf
-
+    - mkdir public  # create a folder called public
+    - cp main.pdf public  # copy the pdf file into the public folder
   artifacts:
-    paths:
-      - "*.pdf"
+    paths: 
+      - public  # instruct GitLab to keep the public folder
+  only: 
+    - main  # deploy the pdf only for commits made to the main branch 
-- 
GitLab