I'm testing out deploying a Hexo site on GitLab Pages. I'm currently using a theme that someone has posted to GitHub, and thus have a Git submodule in the themes
folder of my Hexo project such that the top-level .gitmodules
file looks like:
[submodule "themes/Hacker"]
path = themes/Hacker
url = https://github.com/CodeDaraW/Hacker.git
I'm using the Hexo doc's recommended YAML file (updated for current Node) for CI settings, and the CI job seems to go smoothly except that it randomly decides to skip Git submodules setup:
Getting source from Git repository 00:01
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/jjeffrey/jjeffrey.gitlab.io/.git/
Created fresh repository.
Checking out 76f8757a as master...
Skipping Git submodules setup
Restoring cache 00:01
Checking cache for default...
FATAL: file does not exist
This prevents the site from properly generating the HTML/CSS files because no theme is present:
$ hexo generate
INFO Validating config
INFO Start processing
INFO Files loaded in 100 ms
WARN No layout: 1970/01/01/hello-world/index.html
WARN No layout: 1970/01/01/test_new/index.html
WARN No layout: archives/index.html
WARN No layout: archives/1970/index.html
WARN No layout: archives/1970/01/index.html
WARN No layout: index.html
INFO Generated: archives/index.html
INFO Generated: archives/1970/index.html
INFO Generated: archives/1970/01/index.html
INFO Generated: index.html
INFO Generated: 1970/01/01/hello-world/index.html
INFO Generated: 1970/01/01/test_new/index.html
INFO 6 files generated in 13 ms
How do I ensure that GitLab actually loads the Git submodule properly so that my theme loads?