Deploy your Thulite Site to GitLab Pages
You can use GitLab Pages to host a Thulite site for your GitLab projects, groups, or user account.
How to deploy
Follow the instructions below to deploy your Thulite site to GitLab pages.
-
Create a file called
.gitlab-ci.yml
in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:.gitlab-ci.yml # The Docker image that will be used to build your appimage: node:lts# Functions that should be executed before the build script is runbefore_script:- npm cipages:script:- npm run buildartifacts:paths:# The folder that contains the files to be exposed at the Page URL- publicrules:# This ensures that only pushes to the default branch will trigger# a pages deploy- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH -
On GitLab, go to your repository’s Deploy tab and find the Pages section.
-
Copy the Access pages URL and paste it as
baseurl
in./config/production/hugo.toml
. -
Set
canonifyURLs = true
in./config/production/hugo.toml
. -
Push the changes to GitLab.
That’s it. After a minute or so, you site is avaliable at the Access pages URL.