Site Publishing - Matt Whipple

This site is published using GitLab Pages(1).

The documentation for GitLab pages(1) is overall solid but it seems fairly example heavy which leaves the need for a fair amount of inference based on those examples, though the reference documentation seems fairly compehensive. The publishing itself is handled by a .gitlab-ci.yml file and is tied to a “specific job called pages” within that file(2).


Currently the file uses a standard alpine image with an unpinned version (tsk tsk):

image: alpine:latest

Publishing should only be done for the primary branch so a workflow will be configured to target branches (3).

    - if: '$CI_COMMIT_BRANCH'

The special pages job is defined which should be run during the deploy stage (3).

  stage: deploy

While no additional preparation is required, a script element is expected and therefore an effective no-op is added:

    - echo 'Nothing to do...'

The (already existing) public directory will be published as an artifact:

      - public

Deployment of updates should only be performed for the primary branch:

    - if: '$CI_COMMIT_BRANCH == "master"'
GitLab pages | GitLab [online]. 21 April 2021. Available from:
Keyword reference for the .gitlab-ci.yml file | GitLab #pages [online]. June 2021. Available from:
Create a GitLab pages website from scratch | GitLab [online]. 30 May 2021. Available from: