[solved] Finding a basic workflow with Hugo and Gitlab-pages

You shouldn’t need to do that.

When the Gitlab CI runner runs, it only clones your blog git repo. It will not clone nested git submodules like a theme git repo unless you ask it to.

I prefer to not blend my theme and blog repos. That way I can independently maintain my theme and reuse it in multiple blogs.

Here is my Gitlab CI config: Files · master · Kaushal Modi / kaushalmodi.gitlab.io · GitLab

Here is the relevant piece from that that clones the theme:

  # * Install my theme; need to first install git and then do git submodule update for that.
  - apk add git
  - git submodule init
  - git submodule update --force

You also need a .gitmodules that points to the sub-modules: Files · master · Kaushal Modi / kaushalmodi.gitlab.io · GitLab