# Automate your Awesome-CV with XeLaTeX and Gitlab CI

Image by Me on Sérgio Mendonça’s website

### Gitlab CI

There are numerous tutorials and documentation to learn Gitlab CI/CD. It’s enough you just google it. :p

Everyone who knows LaTeX will probably complain now because I could just use Overleaf to edit my CV in the browser. That’s totally correct, but I want to use Gitlab CI to present you with a simple exercise on Gitlab Continuous Integration.

I forked the official Awesome-CV repository into my own Gitlab. Everything that builds your Awesome-CV automatically can be found in the .gitlab-ci.yml file.

pdf:
image: thomasweise/texlive
script:
- cd examples
- xelatex cv.tex
artifacts:
paths:
- examples/cv.pdf


### Explanation

By adding this file into the root directory of the repository a GitLab runner will execute the defined tasks.

• pdf defines the name of the runner job.

• image: The runner starts the docker image that has texlive installed, labeled thomasweise/texlive;

• Everything in script will be executed in the docker container. Just like we use XeLaTeX on our local machine;

• The runner will switch to the examples folder and;
• Execute xelatex cv.tex;
• That will generate a PDF file - if no error occurred.

• To obtain the generated PDF file we have to define the file as an artifact. The artifacts can be downloaded into a zipfile or browse to examples/cv.pdf, if the job has finished successfully.

The jobs for my repository can be found here.

In the README.md the status of the pipeline is displayed and direct links to the artifacts can be found. Have a look at the official documentation for the badges.

# My Awesome-CV