Hi.
I managed to deploy my blog to Gitlab following the fantastic documents. It went easy and quick. The only thing (not really a problem) I want to deploy my Hugo blog to Gitlab and access it under my (“https://username.gitlab.io”) ?
As I followed the instructions, my blog is available under (“https://username.gitlab.io/projectName”).
Thanks in advance for your helps
and thanks for the polished and organized new docs. It is super easy to follow.
The instructions on the docs regarding Gitlab deployment only cover publishing on a subdirectory (CC @rdwatters )
That may be OK for someone who manages multiple projects with custom domains in his Gitlab repo
But for a user who doesn’t want to use a custom domain on Gitlab Pages the docs instructions will make a Hugo site’s internal links inaccessible because Hugo does not like subdirectories for its root folder.
To deploy with your username @reza you need to do the following in your project’s settings:
@alexandros Full disclosure: my gitlab experience is next to zero. If you want to submit a PR for corrections/improvements, I would be happy to review it.
and followed the rest of instructions as documents. After gitlab build the site I tried to open the link but nothing.
I tried one more time whole process and this time gitlab did not build the site for some reason.
I deleted the project and I will try to push it to project name subdomain again.
My knowledge of git are very limited. I am trying to learn.
guids, helps are appreciated. Love this community.
Also have you included a .gitlab-ci.yml for Gitlab Pages in the root of your Hugo project, so that the Gitlab Pages runner can build your site?
This file’s contents should be like this:
image: publysher/hugo
pages:
script:
- hugo
artifacts:
paths:
- public
only:
- master
If you have the above in your local Hugo project and you have set up your Gitlab project settings as you wrote in your previous reply and still you cannot get this to work then ask for help at the Gitlab Forums.
EDIT
If you’re trying to access your Gitlab repository with SSH it doesn’t work. There a lot of topics at the Gitlab forums about this issue and workarounds but I haven’t bothered. HTTPS works out of the box.
Thank You so much for your help. It worked perfectly. The problem was in my .git/config.
I only copy pasted your script and now my blog is up and running.
Thanks again onedrawingperday