With GitLab Pages it's easy to publish your project website. GitLab Pages is a hosting service for static websites, at no additional cost.
Create a project from scratch to get you started quickly, or, alternatively, start from an existing project as follows:
- Change a file to trigger a GitLab CI/CD pipeline: GitLab CI/CD will build and deploy your site to GitLab Pages.
- Visit your project's Settings > Pages to see your website link, and click on it. Bam! Your website is live! :)
Further steps (optional):
- Remove the fork relationship (You don't need the relationship unless you intent to contribute back to the example project you forked from).
- Make it a user/group website
Watch a video with the steps above: https://www.youtube.com/watch?v=TWqh9MtT4Bg
How Does It Work?
With GitLab Pages you can create static websites for your GitLab projects, groups, or user accounts.
It supports plain static content, such as HTML, and all static site generators (SSGs), such as Jekyll, Middleman, Hexo, Hugo, and Pelican.
Connect as many custom domains as you like and bring your own TLS certificate to secure them.
Your files live in a project repository on GitLab.
GitLab CI picks up those files and makes them available at, typically,
https://<username>.gitlab.io/<projectname>. Please read through the docs on
GitLab Pages domains for more info.
Explore GitLab Pages
Read the following tutorials to know more about:
- Static websites and GitLab Pages domains: Understand what is a static website, and how GitLab Pages default domains work
- Projects for GitLab Pages and URL structure: Forking projects and creating new ones from scratch, understanding URLs structure and baseurls
- GitLab Pages custom domains and SSL/TLS Certificates: How to add custom domains and subdomains to your website, configure DNS records, and SSL/TLS certificates
Creating and Tweaking GitLab CI/CD for GitLab Pages: Understand how to create your own
.gitlab-ci.ymlfor your site
- Technical aspects, custom 404 pages, limitations
- Hosting on GitLab.com with GitLab Pages (outdated)
Blog posts series about Static Site Generators (SSGs):
- SSGs part 1: Static vs dynamic websites
- SSGs part 2: Modern static site generators
- SSGs part 3: Build any SSG site with GitLab Pages
Blog posts for securing GitLab Pages custom domains with SSL/TLS certificates:
- Posting to your GitLab Pages blog from iOS
- GitLab CI: Run jobs sequentially, in parallel, or build a custom pipeline
- GitLab CI: Deployment & environments
- Building a new GitLab docs site with Nanoc, GitLab CI, and GitLab Pages
- Publish code coverage reports with GitLab Pages
Admin GitLab Pages for CE and EE
Enable and configure GitLab Pages on your own instance (GitLab Community Edition and Enterprise Editions) with the admin guide.
Watch the video: https://www.youtube.com/watch?v=dD8c7WNcc6s
More information about GitLab Pages
- For an overview, visit the feature webpage
- Announcement (2016-12-24): "We're bringing GitLab Pages to CE"
- Announcement (2017-03-06): "We are changing the IP of GitLab Pages on GitLab.com"