A Hugo website on your local machine that you are ready to publish
In the root directory of your Hugo site, create a .gitlab-ci.yml file. The .gitlab-ci.yml configures the GitLab CI on how to build your page. Simply add the content below.
Push Your Hugo Website to GitLab
Next, create a new repository on GitLab. It is not necessary to make the repository public. In addition, you might want to add /public to your .gitignore file, as there is no need to push compiled assets to GitLab or keep your output website in version control.