I am able to build my site locally with both hugo server and hugo command even if it takes long time (about 30 or 50s),
But when trying to deploy with Gitlab pages, it failed regularly and I got the following message:
Updating/initializing submodules recursively...
$ hugo --gc
Building sites … ERROR: Job failed: execution took longer than 1h0m0s seconds
The repository is well clone but not able to deploy on the pages itself.
The message is a little bit laconic and I suspect an issue with subsidize, but as far as I know, I don’t use any subsmodule.
Any idea of how to solve the issue or at least identify where it comes from?
Ha, you talk about being laconic! My first thought is to use template metrics to figure out why the site takes so long to build locally, but maybe you’ve got your own thing going with some massive amount of data or something…
If you aren’t looking for advice reducing build time, I’d look at the issue as being the GitLab’s hardware not liking how long it is taking to clean up your project. If it is using the gitlab.org runners, it is possible your jobs are sharing capacity with a bunch of projects, and that could time it out. I’d try a dedicated runner, a different way to put the site files into the repo served as your site…
Also, how about removing --gc? Move whatever that cleans into a different part of the build chain.
Check out Requesting Help and post repos if you want more eyes to look at your issue.
Thanks maiki.
You’re right. I should have began with long time building site locally.
As suggested, I run template metrics and got the following result:
I guess that the single.html is the problem.
You’re right. I have to focus on reducing the building time but don’t know where to start from.
Could you suggest a process or something like that.