From bf97478b89b24bbf3a6a92c9137041cf2e987f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 19 Sep 2018 17:12:51 +0200 Subject: Add a job to deploy and undeploy the doc for tags fix #3377 --- .gitlab-ci.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3bfd4b..ffc0c60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -239,7 +239,7 @@ packaging:archlinux: # Deploy jobs # -doc: +deploy_doc: stage: deploy only: - branches@louiz/biboumi @@ -255,3 +255,37 @@ doc: - rm -rf /www/latest - mv _build/html /www/latest dependencies: [] + +deploy_doc_tag: + stage: deploy + only: + - tags@louiz/biboumi + tags: + - www + environment: + name: doc.$CI_COMMIT_TAG + url: https://doc.biboumi.louiz.org/$CI_COMMIT_TAG/ + on_stop: undeploy_doc_tag + image: docker.louiz.org/louiz/biboumi/doc-builder + script: + - cd doc/ + - make html + - mv _build/html /www/$CI_COMMIT_TAG + dependencies: [] + +undeploy_doc_tag: + stage: deploy + only: + - tags@testing/biboumi + tags: + - www + variables: + GIT_STRATEGY: none + environment: + name: doc.$CI_COMMIT_TAG + action: stop + image: docker.louiz.org/louiz/biboumi/doc-builder + script: + - rm -rf /www/$CI_COMMIT_TAG + when: manual + dependencies: [] -- cgit v1.2.3