I used to deploy my blog (yes, this blog, powered by
Hugo) to 
GitHub however, I hate the fact that it makes my page repository public and I have to pay in order to privatise it.
So, here it comes, the deployment switch to 
GitLab took place. I referred to the tutorial available in Hugo website, [Hosting on GitLab Pages] and followed the tutorial with a slightly different approach.
Explained below are the steps I took in hosting my blog on
.gitlab-ci.ymlfile in the root directory of the Hugo site. As explained in the tutorial provided by Hugo,
"The .gitlab-ci.yml configures the GitLab CI on how to build your page. Simply add the content below."
image: publysher/hugo pages: script: - hugo artifacts: paths: - public only: - master
GitLabwhich is not necessarily set to be available publicly. This is where the difference lies between the approach provided in Hugo tutorial and mine. In my case, I created a 
GitLab Pagessimilar to the one provided by 
GitHub Pages. Since I wanted my blog to be available at https://wraihan.gitlab.io, I created a repository with that name and assigned a
SSH key[Deploy keys] to it;
config.tomlfile with the website URL:
baseurl = "https://username.gitlab.io/"
hugo' where it will automatically create a
.gitignorefile as there is no need to push compiled assets to
echo "/public" >> .gitignore
git submodule add email@example.com:wraihan/wrase.git themes/wrase
git add . git commit -m "Initial commit" git remote add origin firstname.lastname@example.org:username/username.gitlab.io.git git push -u origin master
deploy.shwith the following codes, which is adopted from [Hosting Personal/Organization Pages]:-
#!/bin/bash # Add changes to git. git add . # Commit changes. msg="rebuilding site `date`" if [ $# -eq 1 ] then msg="$1" fi git commit -m "$msg" # Push source and build repos. git push -u origin master
./deploy.sh "commit message"' to send changes to the created
GitLabusers and developers over the past few months.