diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b58aa828fa7f2f6bb30638cc5f057e568ad19d06..98030dc2842a165d588d88512a7c896e1323d66a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: - checks - tests - package - - coverage + - website variables: DOCKER_IMAGE: "registry.duniter.org/docker/python3/poetry" @@ -216,14 +216,18 @@ release: tag_name: "$CI_COMMIT_TAG" description: "$CI_COMMIT_TAG" -pages: - extends: .changes +website: + stage: website needs: ["tests:3.12:cov"] + variables: + RELEASE: "0.12" rules: - - if: $CI_COMMIT_BRANCH == "main" - stage: coverage - script: mv cov_html/ public/ - artifacts: - paths: - - public - expire_in: 2 days + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + script: + - poetry install --only docs + - git fetch origin pages --depth=1 + - git config user.name $GITLAB_USER_NAME + - git config user.email $GITLAB_USER_EMAIL + - poetry run mike deploy $RELEASE + - git remote set-url origin "https://${TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" + - git push origin pages