10 Feb 2022
I store my resume as a source .tex
file in a GitHub repository. When I need to send it to someone,
I either have to find the most recent version in my emails or go through the process of rebuilding it.
I wanted to set up a job that would automatically build the final .pdf
file everytime I push
an updated version. That way I would always know where to look for it. For the sake of this
excercise, I will ignore the fact that just syncing your repo with Overleaf is by far the easiest
option.
My initial idea was to start with an Ubuntu runner, set up a minimal TexLive environment and then use texliveonfly to install just the packages required by the document.
When I was not able to get the tlmgr
package manager working, I resorted to a more straightforward approach.
I run the job in a container using texlive/texlive:latest-full
Docker image that includes pretty much every
LaTeX package you could ever need. The downside is that the compressed image is over 2 GB which means it takes
some time to start everything up. The average run duration of the entire job is under 2 minutes,
which I think is still acceptable.
The built .pdf
needs to be somehow published. This can be done in two ways (that I know of):
I use both approaches (there are pre-made actions available: artifact, release). Each build produces the resume as an artifact and each new tag triggers a release.
Important detail is that artifacts are retained only for 90 days.
Because of the pre-made actions handling the most complex parts, the entire job is very short.