Search code examples
gitlab-cimkdocsto-be-continuous

to-be-continous Mkdocs gitlab-ci template, why variant usage?


To deploy pages on gitlab, we needs to add a "variant" include.

Why it's an external yaml file and don't use the same template file with an option to (de)activate it ?


Solution

  • Another very pragmatic reason is that the job to deploy GitLab pages is mandatorily named pages.

    If to be continuous has several templates that support GitLab pages deployment, they can't all declare a pages job or you'll have name collision troubles when including them all.

    That's why GitLab pages jobs have necessarily to be in an optional additional template: that's what we call variants.