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

Update 2 files

- /build-page.sh
- /.gitlab-ci.yml
parent 12ff5298
No related branches found
No related tags found
1 merge request!10merge for publish
Pipeline #245064 passed
...@@ -25,14 +25,10 @@ build-page: ...@@ -25,14 +25,10 @@ build-page:
else else
./build-page.sh "/draft" false ./build-page.sh "/draft" false
fi fi
artifacts: artifacts:
paths: paths:
- public - public
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish"
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish"
when: always
deploy-draft: deploy-draft:
stage: deploy stage: deploy
......
...@@ -14,6 +14,7 @@ if [ "$IS_PUBLISH_DEPLOYMENT" = true ]; then ...@@ -14,6 +14,7 @@ if [ "$IS_PUBLISH_DEPLOYMENT" = true ]; then
else else
cp _config.yml _config.yml.bak cp _config.yml _config.yml.bak
yq -i '.is_draft = false' _config.yml yq -i '.is_draft = false' _config.yml
echo "is_draft set to false in _config.yml"
fi fi
else else
echo "Using draft deployment strategy" echo "Using draft deployment strategy"
...@@ -24,8 +25,17 @@ else ...@@ -24,8 +25,17 @@ else
else else
cp _config.yml _config.yml.bak cp _config.yml _config.yml.bak
yq -i '.is_draft = true' _config.yml yq -i '.is_draft = true' _config.yml
echo "is_draft set to true in _config.yml"
fi fi
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" bundle exec jekyll build -d public -b "$PAGE_ROOT"
# Check the build result
if [ $? -ne 0 ]; then
echo "Jekyll build failed"
exit 1
else
echo "Jekyll build succeeded"
fi
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