Skip to content
Snippets Groups Projects
Commit 76356010 authored by Julien Satti's avatar Julien Satti :sparkles:
Browse files

Update .gitlab-ci.yml file

parent c422137c
No related branches found
No related tags found
No related merge requests found
Pipeline #11924 passed
......@@ -4,7 +4,7 @@ pages:
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PAGES_BRANCH: gl-pages
HTTPS_REMOTE: https://gitlab-ci-token:${CUSTOM_PROJECT_ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git // CI_JOB_TOKEN is not allowed to push the code yet without feature flag enabled
HTTPS_REMOTE: https://gitlab-ci-token:${CUSTOM_PROJECT_ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git
before_script:
- pip install -q mkdocs-material mkdocs-glightbox mkdocs-markdownextradata-plugin mike
- apt-get update -qq && apt-get -qq install -y git > /dev/null
......@@ -18,9 +18,7 @@ pages:
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_NAME" == "develop" ]; then
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH
elif [ -n "$CI_CLEAN" ]; then
rm -rf public/$CI_CLEAN
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH latest
fi
- git checkout $PAGES_BRANCH -- public/
......@@ -28,6 +26,9 @@ pages:
paths:
- public/
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
#- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
- if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_REF_NAME == "main"'
- if: '$CI_COMMIT_REF_NAME == "develop"'
......
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