This article explains how to deploy sites to GitLab Pages using GitLab CI.

Workflow

Create .gitlab-ci.yml at the root of your site with the following contents:

1% code/deployment-gitlab-pages-ci %

The example above will only deploy the default branch to GitLab Pages and run a test on the rest of the branches.

See also: