Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2024-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUDE
2024-website
Commits
12ff5298
Commit
12ff5298
authored
7 months ago
by
Kwangjin Lee
Browse files
Options
Downloads
Patches
Plain Diff
Update 2 files
- /build-page.sh - /.gitlab-ci.yml
parent
f1054b16
No related branches found
Branches containing commit
No related tags found
1 merge request
!10
merge for publish
Pipeline
#245063
passed
7 months ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-4
3 additions, 4 deletions
.gitlab-ci.yml
build-page.sh
+10
-2
10 additions, 2 deletions
build-page.sh
with
13 additions
and
6 deletions
.gitlab-ci.yml
+
3
−
4
View file @
12ff5298
...
...
@@ -20,13 +20,12 @@ build-page:
-
chmod +x ./build-page.sh
script
:
-
|
if [ "$CI_COMMIT_BRANCH" == "publish" ] || [ "$CI_COMMIT_BRANCH" == "main" ]; then
echo "Running on branch $CI_COMMIT_BRANCH"
if [ "$CI_COMMIT_BRANCH" == "publish" ]; then
./build-page.sh "/" true
else
echo "Running on other branches"
./build-page.sh /draft false
./build-page.sh "/draft" false
fi
artifacts
:
paths
:
-
public
...
...
This diff is collapsed.
Click to expand it.
build-page.sh
+
10
−
2
View file @
12ff5298
...
...
@@ -7,7 +7,7 @@ PAGE_ROOT=$(echo "$PAGE_ROOT" | sed 's:/*$::')
if
[
"
$IS_PUBLISH_DEPLOYMENT
"
=
true
]
;
then
echo
"Using publish deployment strategy"
# Remove the baner which identifies the
book
as a draft
# Remove the ban
n
er which identifies the
site
as a draft
if
!
command
-v
yq &>/dev/null
;
then
echo
"yq could not be found, the draft banner cannot be removed"
echo
"Please install yq (with APT or via https://github.com/mikefarah/yq#install) and try again"
...
...
@@ -17,7 +17,15 @@ if [ "$IS_PUBLISH_DEPLOYMENT" = true ]; then
fi
else
echo
"Using draft deployment strategy"
# Ensure the draft flag is true for non-publish deployments
if
!
command
-v
yq &>/dev/null
;
then
echo
"yq could not be found, the draft banner cannot be enforced"
echo
"Please install yq (with APT or via https://github.com/mikefarah/yq#install) and try again"
else
cp
_config.yml _config.yml.bak
yq
-i
'.is_draft = true'
_config.yml
fi
fi
echo
"Publishing to
page root:
\"
$PAGE_ROOT
\"
"
echo
"Publishing to page root:
\"
$PAGE_ROOT
\"
"
bundle
exec
jekyll build
-d
public
-b
"
$PAGE_ROOT
"
This diff is collapsed.
Click to expand it.
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