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
OCF
documentation
Commits
76356010
Commit
76356010
authored
3 months ago
by
Julien Satti
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
c422137c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#11924
passed
3 months ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+5
-4
5 additions, 4 deletions
.gitlab-ci.yml
with
5 additions
and
4 deletions
.gitlab-ci.yml
+
5
−
4
View file @
76356010
...
...
@@ -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"'
...
...
This diff is collapsed.
Click to expand it.
Julien Satti
@sattij
mentioned in commit
8785c854
·
3 months ago
mentioned in commit
8785c854
mentioned in commit 8785c854d678629ff304ddf21ee1f0e85c215a70
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment