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:
- documentation
- sonarqube
- trigger_jenkins_build
- publish-prod-1
- publish-prod-2
#################################### tox - Testing and linting
run-tox-pipeline:
......@@ -43,22 +45,21 @@ run-tox-pipeline:
paths:
- htmlcov
##### Sphinx - Generate documentation
##### MkDocs - Generate documentation
build-documentation:
stage: documentation
tags:
- docker-executor
image: sphinxdoc/sphinx:latest
image: python:latest
before_script:
- pip install sphinx_rtd_theme sphinxcontrib-jquery
- cd $CI_PROJECT_DIR/docs/source
- pip install mkdocs-material
script:
- make html
- mkdocs build --site-dir public
artifacts:
paths:
- $CI_PROJECT_DIR/docs/build/html
- public
##### Vale - Documentation linter
lint-documentation:
......@@ -74,11 +75,47 @@ lint-documentation:
artifacts: true
before_script:
- cd $CI_PROJECT_DIR/docs/vale
- cd $CI_PROJECT_DIR/vale
- vale sync
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:
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