Skip to content
Snippets Groups Projects
Verified Commit 757891cc authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Update CI

parent 080741be
No related branches found
No related tags found
1 merge request!316Replace Sphinx with MkDocs
...@@ -4,6 +4,8 @@ stages: ...@@ -4,6 +4,8 @@ stages:
- documentation - documentation
- sonarqube - sonarqube
- trigger_jenkins_build - trigger_jenkins_build
- publish-prod-1
- publish-prod-2
#################################### tox - Testing and linting #################################### tox - Testing and linting
run-tox-pipeline: run-tox-pipeline:
...@@ -43,22 +45,21 @@ run-tox-pipeline: ...@@ -43,22 +45,21 @@ run-tox-pipeline:
paths: paths:
- htmlcov - htmlcov
##### Sphinx - Generate documentation ##### MkDocs - Generate documentation
build-documentation: build-documentation:
stage: documentation stage: documentation
tags: tags:
- docker-executor - docker-executor
image: sphinxdoc/sphinx:latest image: python:latest
before_script: before_script:
- pip install sphinx_rtd_theme sphinxcontrib-jquery - pip install mkdocs-material
- cd $CI_PROJECT_DIR/docs/source
script: script:
- make html - mkdocs build --site-dir public
artifacts: artifacts:
paths: paths:
- $CI_PROJECT_DIR/docs/build/html - public
##### Vale - Documentation linter ##### Vale - Documentation linter
lint-documentation: lint-documentation:
...@@ -74,11 +75,47 @@ lint-documentation: ...@@ -74,11 +75,47 @@ lint-documentation:
artifacts: true artifacts: true
before_script: before_script:
- cd $CI_PROJECT_DIR/docs/vale - cd $CI_PROJECT_DIR/vale
- vale sync - vale sync
script: script:
- vale --glob='!*/migrations/*' $CI_PROJECT_DIR/docs/source $CI_PROJECT_DIR/gso - vale --glob='!*/migrations/*' $CI_PROJECT_DIR/docs/ $CI_PROJECT_DIR/gso/
##### Publish documentation artefacts
publish-prod-2:
stage: publish-prod-2
# First deploy to prod-2
tags:
- gap-docs-prod-2
only:
refs:
- main # Only publish when on the main branch
needs:
- job: build-documentation
artifacts: true
script:
- rm -rf /var/www/gap-docs/*
- mv $CI_PROJECT_DIR/public/* /var/www/gap-docs/
publish-prod-1:
stage: publish-prod-1
# When successful, also deploy to prod-1
tags:
- gap-docs-prod-1
only:
refs:
- main # Only publish when on the main branch
needs:
- job: build-documentation
artifacts: true
script:
- rm -rf /var/www/gap-docs/*
- mv $CI_PROJECT_DIR/public/* /var/www/gap-docs/
sonarqube: sonarqube:
stage: sonarqube stage: sonarqube
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment