From e4ece8fba6622f55e7c4d15fab6e348b0299532d Mon Sep 17 00:00:00 2001 From: Jacques Dainat <jacques.dainat@ird.fr> Date: Fri, 26 Jan 2024 11:20:01 +0100 Subject: [PATCH] add ci to deploy --- .gitlab-ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..69cc43b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,38 @@ +image: ubuntu:latest + +workflow: + rules: + - if: $CI_COMMIT_BRANCH + +cache: + key: $CI_COMMIT_REF_SLUG + +before_script: + - apt-get update + - apt-get upgrade -y + - apt-get install -y python3-pip + - pip install mkdocs-material + - pip install pymdown-extensions + - pip install mkdocs-minify-plugin + - pip install mkdocs-macros-plugin + +test: + stage: test + script: + - mkdocs build --strict --verbose --site-dir test + artifacts: + paths: + - test + rules: + - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH + +pages: + stage: deploy + script: + - mkdocs build --verbose + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + -- GitLab