GitLab CI template for MkDocs
This project implements a generic GitLab CI template for MkDocs.
It provides several features, usable in different modes (by configuration).
In order to include this template in your project, add the following to your
include: - project: 'to-be-continuous/mkdocs' ref: '1.4.3' file: '/templates/gitlab-ci-mkdocs.yml'
The MkDocs template uses some global configuration used throughout all jobs.
||The Docker image used to run MkDocs||
||MkDocs sources directory||
||Requirements file. If the file is not found in the repository, requirements are read from the
||Space separated requirements (ignored if a requirement file is found)||
||MkDocs generated site directory (relative to
||Pre-build hook script||
||Python repository url||none|
||pip extra options||none|
This job performs MkDocs build. It uses the following variable:
||Arguments used by the build job||none|
The built documentation is generated in the
Be sure to update
MKD_SITE_DIR if you change the output directory (via the
MKD_BUILD_ARGS variable or the
this template is not a deployment template and it only builds a MkDocs project.
GitLab Pages variant
Basically it copies the content of the mkdocs generated site folder (
site by default) to the
public folder which is published by GitLab pages.
If you wish to use it, add the following to your
include: # main template - project: 'to-be-continuous/mkdocs' ref: '1.4.3' file: '/templates/gitlab-ci-mkdocs.yml' # GitLab pages variant - project: 'to-be-continuous/mkdocs' ref: '1.4.3' file: '/templates/gitlab-ci-mkdocs-pages.yml'
This template is actually tested and validated on GitLab Community Edition instance version 13.12.11