Cannot publish hugo via GitLab pipeline

Hi,
currently I have a working local environment using the latest hugo version and the following configuration:

baseURL = "https://docebo-dev-notes-docebo-learn-learn3-e31e45e2017fd563fb865ad9a4.gitlab.io"
languageCode = 'en'
title = 'Docebo Dev Notes'
#sectionPagesMenu = 'main'
theme = ["hugo-notice", "docsy"]

#[[menu.main]]
#name = "Blog"
#url = ""
#weight = 1

contentDir = "content/en"
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false
# Useful when translating.
enableMissingTranslationPlaceholders = true

enableRobotsTXT = false

# Will give values to .Lastmod etc.
enableGitInfo = true

# Comment out to enable taxonomies in Docsy
disableKinds = ["taxonomy"]

# You can add your own taxonomies
[taxonomies]
tag = "tags"
category = "categories"

[params.taxonomy]
# set taxonomyCloud = [] to hide taxonomy clouds
taxonomyCloud = ["tags", "categories"]

# If used, must have same length as taxonomyCloud
taxonomyCloudTitle = ["Tag Cloud", "Categories"]

# set taxonomyPageHeader = [] to hide taxonomies on the page headers
taxonomyPageHeader = ["tags", "categories"]

# Highlighting config
pygmentsCodeFences = true
pygmentsUseClasses = false
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = false
#pygmentsOptions = "linenos=table"
# See https://help.farbox.com/pygments.html
pygmentsStyle = "tango"

# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"

# Image processing configuration.
[imaging]
resampleFilter = "CatmullRom"
quality = 75
anchor = "smart"

# Language configuration

[languages]
[languages.en]
languageName ="English"
# Weight used for sorting.
weight = 1
[languages.en.params]
title = "Docebo Dev Notes"
description = "Developments notes"

# Adding other items to the navbar
#[menus]
#[[menus.main]]
#name = 'Products'
#url = '/products'
#weight = 10

[markup]
[markup.goldmark]
[markup.goldmark.parser.attribute]
block = true
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
style = "tango"
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
guessSyntax = "true"

# Everything below this are Site Params

# Comment out if you don't want the "print entire section" link enabled.
[outputs]
section = ["HTML", "print", "RSS"]

[params]
copyright = "Christian Castelli"
privacy_policy = ""

# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]

# Menu title if your navbar has a versions selector to access old versions of your site.
# This menu appears only if you have at least one [params.versions] set.
version_menu = "Releases"

# Flag used in the "version-banner" partial to decide whether to display a
# banner on every page indicating that this is an archived version of the docs.
# Set this flag to "true" if you want to display the banner.
archived_version = false

# The version number for the version of the docs represented in this doc set.
# Used in the "version-banner" partial to display a version number for the
# current doc set.
version = "0.0"

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
url_latest_version = "https://docebo.gitlab.io/learn/learn3/docebo_dev_notes"

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://gitlab.com/docebo/learn/learn3/docebo_dev_notes"
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
#github_project_repo = "https://github.com/google/docsy"

# Specify a value here if your content directory is not in your repo's root directory
# github_subdir = ""

# Uncomment this if your GitHub repo does not have "main" as the default branch,
# or specify a new value if you want to reference another branch in your GitHub links
github_branch= "main"

# Google Custom Search Engine ID. Remove or comment out to disable search.
#gcs_engine_id = "d72aa9b2712488cc3"

# Enable Lunr.js offline search
offlineSearch = true
offlineSearchMaxResults = 25
offlineSearchSummaryLength = 200

# Enable syntax highlighting and copy buttons on code blocks with Prism
prism_syntax_highlighting = false

# User interface configuration
[params.ui]
#  Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
# Set to true to disable the About link in the site footer
footer_about_enable = true
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar
navbar_logo = false
# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage.
navbar_translucent_over_cover_disable = false
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = true
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false

# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
# add "hide_feedback: true" to the page's front matter.
[params.ui.feedback]
enable = false
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'

# Adds a reading time to the top of each doc.
# If you want this feature, but occasionally need to remove the Reading time from a single page,
# add "hide_readingtime: true" to the page's front matter
[params.ui.readingtime]
enable = false

[params.links]
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
#[[params.links.user]]
#name = "User mailing list"
#url = "https://example.org/mail"
#icon = "fa fa-envelope"
#desc = "Discussion and help from your fellow users"
#[[params.links.user]]
#name ="Twitter"
#url = "https://example.org/twitter"
#icon = "fab fa-twitter"
#desc = "Follow us on Twitter to get the latest news!"
#[[params.links.user]]
#name = "Stack Overflow"
#url = "https://example.org/stack"
#icon = "fab fa-stack-overflow"
#desc = "Practical questions and curated answers"
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
[[params.links.developer]]
name = "GitLab"
url = "https://gitlab.com/dashboard/projects"
icon = "fab fa-gitlab"
desc = "Development takes place here!"
[[params.links.developer]]
name = "Slack"
url = "https://docebo.slack.com/archives/G0SMMDVKJ"
icon = "fab fa-slack"
desc = "docebo-tech Channel"
[[params.links.developer]]
name = "Confluence"
url = "https://docebo.atlassian.net/wiki/home"
icon = "fa-brands fa-atlassian"
desc = "Our documentation"

There are a couple of themes (docsy, hugo-notice) both installed as git submodules. When I commit and push an update, the pipeline now fails:

Running with gitlab-runner 17.0.0~pre.88.g761ae5dd (761ae5dd)
  on green-5.saas-linux-small-amd64.runners-manager.gitlab.com/default xS6Vzpvo, system ID: s_6b1e4f06fcfd
Resolving secrets
Preparing the "docker+machine" executor
00:06
Using Docker executor with image registry.gitlab.com/pages/hugo:latest ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/pages/hugo:latest ...
Using docker image sha256:1bd05bebbfab8587df8caf7c69fcb0b04b0facc0920f7922b1d2925674a04cfd for registry.gitlab.com/pages/hugo:latest with digest registry.gitlab.com/pages/hugo@sha256:2bfb056160fa62c5b3943caa071ac19742a05a1e370f36ebc117cbac05a856e5 ...
Preparing environment
00:02
Running on runner-xs6vzpvo-project-52612984-concurrent-0 via runner-xs6vzpvo-s-l-s-amd64-1725290570-716013ae...
Getting source from Git repository
00:02
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/docebo/learn/learn3/docebo_dev_notes/.git/
Created fresh repository.
Checking out 7b52eec7 as detached HEAD (ref is main)...
Updating/initializing submodules recursively with git depth set to 20...
Submodule 'themes/docsy' (https://github.com/google/docsy.git) registered for path 'themes/docsy'
Submodule 'themes/hugo-notice' (https://github.com/martignoni/hugo-notice.git) registered for path 'themes/hugo-notice'
Synchronizing submodule url for 'themes/docsy'
Synchronizing submodule url for 'themes/hugo-notice'
Cloning into '/builds/docebo/learn/learn3/docebo_dev_notes/themes/docsy'...
Cloning into '/builds/docebo/learn/learn3/docebo_dev_notes/themes/hugo-notice'...
Submodule path 'themes/docsy': checked out '7951194954708d7cc992e3540c8fc823cc99a953'
Submodule path 'themes/hugo-notice': checked out '40327ac00cc4960bf85c26c3ab11c9c5725e6968'
Updated submodules
Synchronizing submodule url for 'themes/docsy'
Synchronizing submodule url for 'themes/hugo-notice'
Entering 'themes/docsy'
Entering 'themes/hugo-notice'
Entering 'themes/docsy'
Entering 'themes/hugo-notice'
$ git remote set-url origin "${CI_REPOSITORY_URL}"
Executing "step_script" stage of the job script
00:01
Using docker image sha256:1bd05bebbfab8587df8caf7c69fcb0b04b0facc0920f7922b1d2925674a04cfd for registry.gitlab.com/pages/hugo:latest with digest registry.gitlab.com/pages/hugo@sha256:2bfb056160fa62c5b3943caa071ac19742a05a1e370f36ebc117cbac05a856e5 ...
$ hugo
Total in 2 ms
Error: failed to load modules: module "github.com/FortAwesome/Font-Awesome" not found in "/builds/docebo/learn/learn3/docebo_dev_notes/themes/github.com/FortAwesome/Font-Awesome"; either add it as a Hugo Module or store it in "/builds/docebo/learn/learn3/docebo_dev_notes/themes".: module does not exist
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

It seems like a Font-Awesome issue that I don’t have locally. If I try to use this workaround, locally I get a blank page.
The GitLab pipeline I’m using is exactly the same as described here. Ideas?

Solved by entering inside the docsy folder and doing npm i. here is the complete pipeline:

variables:
  DART_SASS_VERSION: 1.77.8
  HUGO_VERSION: 0.133.1
  NODE_VERSION: 20
  GIT_DEPTH: 0
  GIT_STRATEGY: clone
  GIT_SUBMODULE_STRATEGY: recursive
  TZ: Europe/Rome

image:
  name: golang:1.23.0-bookworm

pages:
  script:
    - mkdir -p /etc/apt/keyrings
    - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
    - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
    - apt-get update
    # Install brotli
    - apt-get install -y brotli ca-certificates curl gnupg
    # Install Dart Sass
    - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
    - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
    - cp -r dart-sass/ /usr/local/bin
    - rm -rf dart-sass*
    - export PATH=/usr/local/bin/dart-sass:$PATH
    # Install Hugo
    - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
    - apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
    - rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
    # Install Node.js
    - apt-get install -y nodejs
    # Install Node.js dependencies
    - "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
    - cd themes/docsy
    - git checkout main
    - git pull
    - npm i
    - cd .. && cd ..
    # Build
    - hugo --gc --minify
    # Compress
    - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec gzip -f -k {} \;
    - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec brotli -f -k {} \;
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.