GitLab CI on my personal site and CV

2 minute read Published:

I ported my manual Hugo/GitHub pages portfolio website to GitLab pages to take advantage of GitLab's CI features.

I wanted SSL certs on my GitHub pages site (this website actually), which GitHub pages doesn’t support - GitLab does. The CI advantage actually came for free (it’s not a feature of GitLab that I had on my roadmap to explore).

Unfortunate timing with the recent GitLab pages security issue, but it doesn’t seem to have affected my site yet.


The migration of my site to GitLab was easy, using their example Hugo generators:

# All available Hugo versions are listed here:

  - hugo
  - master

My previous workflow with GitHub pages was:

  • Push Hugo markdown to the develop branch
  • Ran hugo to generate public, the HTML contents
  • Run a shell script to push public to master, which is displayed on GitHub pages

The workflow now is:

  • Push markdown on master

Yay CI.

Latex resume

My resume is in Latex, in a separate project. Bulding it involves installing an unweildy Latex toolchain (lots of texlive packages, etc.).

Also, manually running cp resume.pdf /path/to/website/repository/static and creating a separate release to publish the new resume to my website was another imperfect flow.

I tried to chain CI builds, i.e.:

  • Get the GitLab CI build for my resume project to create resume.pdf as an artifact
  • Using GitLab hooks, trigger a CI build for my website project after every resume build

From the docs, it wasn’t clear but I think that multi-project CI is a feature of paid GitLab and not community GitLab.

I settled on merging the two repositories.

I found a Dockerhub image that contained everything latex in it, so I decided to use the latex image and fetch Hugo into it, to create a unified resume/website builder container: $ cat .gitlab-ci.yml
image: aergus/latex

  - wget -O- | tar -xvzf -
  - make gitlab_build
    - public
  - master

Here’s the Make rule gitlab_build:

gitlab_build: resume localhugo

        make -C ./resume/ clean && make -C ./resume
        cp resume/pdf/resume.pdf ./static/