.gitlab-ci.yml
671 Bytes
# GitLab Pages: build the MkDocs site and publish to GitLab Pages.
# Triggered on every push to the default branch.
#
# Requirements on the GitLab project:
# - GitLab Pages enabled (Settings → Pages).
# - The default branch matches the `rules:` clause below (main).
image: python:3.11-slim
stages:
- build
pages:
stage: build
before_script:
- pip install --quiet --upgrade pip
- pip install --quiet -r requirements.txt
script:
# GitLab Pages requires the published directory to be named `public/`.
- mkdocs build --strict --site-dir public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH