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

Update 3 files

- /build-page.sh
- /.gitlab-ci.yml
- /_config.yml
parent dd3aca90
No related branches found
No related tags found
1 merge request!10merge for publish
Pipeline #245069 passed
......@@ -14,17 +14,18 @@ build-page:
before_script:
- gem install bundler
- bundle install
- wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 --no-verbose -O /usr/local/bin/yq
- chmod +x /usr/local/bin/yq
- 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
echo "Running on publish branch"
./build-page.sh "/" true
elif [ "$CI_COMMIT_BRANCH" == "main" ]; then
echo "Running on main branch"
./build-page.sh "/2024/draft" false
else
echo "Running on other branches"
./build-page.sh /draft false
./build-page.sh "/draft" false
fi
artifacts:
paths:
......
......@@ -99,5 +99,5 @@ compress_html:
blanklines: false
profile: false
is_draft: true
draft_banner: "This is the DRAFT version of the MUDE 2024 website. Content may change frequently."
\ No newline at end of file
# is_draft: true
# draft_banner: "This is the DRAFT version of the MUDE 2024 website. Content may change frequently."
\ No newline at end of file
......@@ -7,25 +7,18 @@ PAGE_ROOT=$(echo "$PAGE_ROOT" | sed 's:/*$::')
if [ "$IS_PUBLISH_DEPLOYMENT" = true ]; then
echo "Using publish deployment strategy"
# Remove the banner which identifies the book 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"
else
cp _config.yml _config.yml.bak
yq -i '.is_draft = false' _config.yml
fi
CONFIG_FILE="_config.yml"
else
echo "Using draft deployment strategy"
# Set is_draft to true for draft deployments
yq -i '.is_draft = true' _config.yml
CONFIG_FILE="_config_draft.yml"
fi
echo "Config file contents after modification:"
cat _config.yml
echo "Using config file: $CONFIG_FILE"
echo "Config file contents:"
cat "$CONFIG_FILE"
echo "Publishing to page root: \"$PAGE_ROOT\""
bundle exec jekyll build -d public -b "$PAGE_ROOT" --config _config.yml
bundle exec jekyll build -d public -b "$PAGE_ROOT" --config "$CONFIG_FILE"
echo "Build complete. Contents of public directory:"
ls -R public
\ No newline at end of file
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