Skip to content
Snippets Groups Projects

Draft: ci: Provide separate job templates for building and deploying docs

Closed Frieder Schrempf requested to merge feature/docs-deploy-separation into master
1 file
+ 38
0
Compare changes
  • Side-by-side
  • Inline
+ 38
0
#
# DEPRECATED: Please use the "docs:build" and "docs:deploy" job templates below
#
# This is a job template that can be used to build HTML docs with mkdocs from
# Markdown files in the ./docs directory. The resulting website is deployed via
# GitLab Pages.
@@ -20,3 +22,39 @@
artifacts:
paths:
- public
#
# This is a job template that can be used to build HTML docs with mkdocs from
# Markdown files in the ./docs directory. The name of the derived job should
# be "docs:build".
#
.docs:build:
tags:
- server
stage: build
image:
name: kontron/docker-ktn-docs
entrypoint: [""]
script:
- cd docs
- mkdocs build
artifacts:
paths:
- docs/site
#
# This is a job template that can be used to deploy the previously built docs
# via GitLab pages. The name of the derived job should be "pages".
#
.docs:deploy:
tags:
- server
stage: deploy
needs: ["docs:build"]
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- mv docs/site public
artifacts:
paths:
- public
Loading