Something might be wrong with Gitlab CI

I am not sure how long this has been going on, since I just realized today my website was broken (might have been about a week). I implemented Gitlab CI workflow with a custom domain for Gitlab Pages. Base URL is properly defined in config. But this part hugo --gc --minify --baseURL ${CI_PAGES_URL} appends the repo name to all links leading to a broken site. For example, /foo becomes /repo-name/foo/. Replacing ${CI_PAGES_URL} with the explicit custom domain solves the issue.

Guess you already checked your GitLab Pages Setup at https://gitlab.com/USER/REPO/pages,

verified that ${CI_PAGES_URL} is what you expect in your worklflow logfile

and your custom domain settings are valid

without custom domain the value is set correctly with a standard setup

I actually don’t know how to test for that. ChatGPT recommends adding a step to the workflow to print the value in the logs. Gitlab docs show export CI_PAGES_URL="https://gitlab-org.gitlab.io/gitlab" where the last part is also added to all my URLs.

It Is. As I said, this was a recent breakage. I set a cron runner to build the site twice a week, so something might have changed then or Gitlab is broken.

Edit: I added - printenv to the workflow and it prints this in the jobs

CI_PAGES_URL=https://tyco.gitlab.io/foo`

Might be an error specific to my project.

so looks like the build takes what it has on the commandline.

I had something with that on github where the connection to the domain somehow got lost and I needed to remove and reconnect and verify my custom domain.

maybe recheck all here:

anyway - this looks like a pure GitLab issue or your custom domain provider

I tried reconnecting the domain and it didn’t work. Had to delete and recreate the project.

Indeed!

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