Skip to content
Snippets Groups Projects
Commit 9d29af87 authored by Dimitrios Giannopoulos's avatar Dimitrios Giannopoulos
Browse files

used mike for multi version docs

parent c7b9ff11
No related branches found
No related tags found
3 merge requests!11Merging "develop" documentation into "main" to tag it as 2024Q2,!9Draft: Added documentation on primitives support feature and NSLCM status,!1Fix/multi version develop
......@@ -3,21 +3,29 @@ pages:
image: python:3.9.18-slim-bullseye
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PAGES_BRANCH: develop
PAGES_BRANCH: gitlab-pages
HTTPS_REMOTE: https://gitlab-ci-token:${ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git
before_script:
- pip install mkdocs-material mike
- apt-get update && apt-get install -y git
- pip install -q mkdocs-material mike
- apt-get update -qq && apt-get -qq install -y git > /dev/null
- git config user.name $GITLAB_USER_NAME
- git config user.email $GITLAB_USER_EMAIL
- git fetch origin $PAGES_BRANCH && git -b checkout $PAGES_BRANCH origin/$PAGES_BRANCH || git checkout $PAGES_BRANCH || echo "Pages branch not deployed yet."
- git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet."
- git checkout $CI_COMMIT_SHA
script:
- mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_TAG latest
- mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest
- git checkout $PAGES_BRANCH -- public/
script:
- |
if [ -n "$CI_COMMIT_TAG" ]; then
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_TAG latest
mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest
elif [ "$CI_COMMIT_REF_PROTECTED" == "true" ]; then
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH $CI_COMMIT_BRANCH
fi
git checkout $PAGES_BRANCH -- public/
artifacts:
paths:
- public/
rules:
- if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
when: always
- when: never
\ No newline at end of file
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