Skip to content
Snippets Groups Projects
Commit 12ff5298 authored by Kwangjin Lee's avatar Kwangjin Lee
Browse files

Update 2 files

- /build-page.sh
- /.gitlab-ci.yml
parent f1054b16
No related branches found
No related tags found
1 merge request!10merge for publish
Pipeline #245063 passed
......@@ -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
......
......@@ -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 banner 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"
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