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

Update CI

parent 40bd8735
No related branches found
No related tags found
1 merge request!316Replace Sphinx with MkDocs
......@@ -4,8 +4,8 @@ stages:
- documentation
- sonarqube
- trigger_jenkins_build
- publish-prod-1
- publish-prod-2
- publish-docs-prod-1
- publish-docs-prod-2
#################################### tox - Testing and linting
run-tox-pipeline:
......@@ -50,16 +50,16 @@ build-documentation:
stage: documentation
tags:
- docker-executor
image: python:latest
image: python:3.12
before_script:
- cd $CI_PROJECT_DIR/docs
script:
- build-docs.sh
- /bin/sh ./build-docs.sh
artifacts:
paths:
- public
- docs/public
##### Vale - Documentation linter
lint-documentation:
......@@ -82,40 +82,33 @@ lint-documentation:
- 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
publish-docs-prod-1:
stage: publish-docs-prod-1
# First deploy to prod-1
tags:
- gap-docs-prod-2
- gap-docs-prod-1
only:
refs:
- main # Only publish when on the main branch
- master # 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/
- mv $CI_PROJECT_DIR/docs/public/* /var/www/gap-docs/
publish-prod-1:
stage: publish-prod-1
# When successful, also deploy to prod-1
publish-docs-prod-2:
stage: publish-docs-prod-2
# When successful, also deploy to prod-2
tags:
- gap-docs-prod-1
- gap-docs-prod-2
only:
refs:
- main # Only publish when on the main branch
- master # 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/
- mv $CI_PROJECT_DIR/docs/public/* /var/www/gap-docs/
sonarqube:
stage: sonarqube
......
......@@ -5,7 +5,8 @@ set -o nounset
export OSS_PARAMS_FILENAME=../gso/oss-params-example.json
export TESTING=true
pip install pyyaml mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-redirects
pip install -e ..
python ./scripts/gen_wf_redirects.py
pip install mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-redirects
mkdocs build --site-dir public
......@@ -25,7 +25,7 @@ for path in sorted(src.rglob("*.py")):
if len(parts) == 4 and "workflows" in parts: # noqa: PLR2004
redirect_map["workflow/" + parts[3] + "/index.md"] = "https://docs.gap.geant.org/reference/" + "/".join(parts)
with Path.open(root / "wf_redirects.yaml", "w") as redirect_file:
with Path.open(root / "docs" / "wf_redirects.yaml", "w") as redirect_file:
file_content = {
"plugins": [
"search",
......
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