It doesn’t fail on my local machine but I look at the docker jacket log for the gitlab version and it seems to fail.
It builds but there are errors which I assume that the script sees and says it fails and doesn’t deploy.
I am using the latest 18.1, I assume that is the issue. Is there a way to update it on GitLab or see the script to make my own?
More info would have been helpful, but taking a wild guess here…
Check out https://gitlab.com/pages/hugo/merge_requests/11
Supposedly using the basic alpine image and adding Hugo is a lot smaller (faster?) than using the publysher image also, for what that’s worth.
I did it that way, and used the appropriate variables for submodule updates, etc. in my .gitlab-ci.yml as follows (you’d obviously want to change command lines as appropriate):
image: alpine:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: "3"
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk update && apk add openssl
- wget https://github.com/spf13/hugo/releases/download/v0.18.1/hugo_0.18.1_Linux-64bit.tar.gz
- echo "e8ba723c508e87912970f132534c64dc hugo_0.18.1_Linux-64bit.tar.gz" | md5sum -c
- tar xf hugo_0.18.1_Linux-64bit.tar.gz && cp ./hugo_0.18.1_linux_amd64/hugo_0.18.1_linux_amd64 /usr/bin
- mv /usr/bin/hugo_0.18.1_linux_amd64 /usr/bin/hugo
- hugo version
pages:
script:
- hugo version
- hugo --verbose --buildDrafts --baseURL="/"
artifacts:
paths:
- public
only:
- master