Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSL
documentation
Merge requests
!7
Fix/multi version
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix/multi version
fix/multi-version
into
main
Overview
0
Commits
7
Pipelines
0
Changes
1
Merged
Dimitrios Giannopoulos
requested to merge
fix/multi-version
into
main
1 year ago
Overview
0
Commits
7
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
532b8057
7 commits,
1 year ago
1 file
+
24
−
4
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
24
−
4
Options
pages
:
pages
:
stage
:
deploy
stage
:
deploy
image
:
python:3.9.18-slim-bullseye
image
:
python:3.9.18-slim-bullseye
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
PAGES_BRANCH
:
gl-pages
HTTPS_REMOTE
:
https://gitlab-ci-token:${ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git
before_script
:
-
pip install -q mkdocs-material mike
-
apt-get update -qq && apt-get -qq install -y git > /dev/null
-
git config --global --replace-all user.name $GITLAB_USER_NAME
-
git config --global --replace-all user.email $GITLAB_USER_EMAIL
-
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
:
script
:
-
pip install mkdocs-material
-
|
-
mkdocs build --site-dir public
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_NAME" == "develop" ]; then
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH
fi
-
git checkout $PAGES_BRANCH -- public/
artifacts
:
artifacts
:
paths
:
paths
:
-
public
-
public
/
rules
:
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
-
if
:
'
$CI_COMMIT_TAG'
-
if
:
'
$CI_COMMIT_REF_NAME
==
"develop"'
when
:
always
-
when
:
never
\ No newline at end of file
Loading