diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23b98de05949311613f5ac9f2c8bf753fdfbc9dc..42dfcf539c82952db0e2aa32ade1911eff05a9cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,13 +5,12 @@ stages: - deploy variables: - JEKYLL_ENV: production LC_ALL: C.UTF-8 build-page: stage: build variables: - JEKYLL_ENV: production + JEKYLL_ENV: ${{ CI_COMMIT_BRANCH == "publish" && "production" || "development" }} before_script: - gem install bundler - bundle install @@ -77,4 +76,4 @@ deploy-production: url: https://mude.citg.tudelft.nl/2024 rules: - if: $CI_COMMIT_BRANCH == "publish" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish" - when: always + when: always \ No newline at end of file diff --git a/_config.yml b/_config.yml index 1ad5464581ade6ed714bb403a3cc48029d280815..fbeec909c7416f711fcc97e6bc8b693fd016065d 100644 --- a/_config.yml +++ b/_config.yml @@ -97,4 +97,7 @@ compress_html: endings: all startings: [] blanklines: false - profile: false \ No newline at end of file + 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 diff --git a/build-page.sh b/build-page.sh index 6a7ce3fe10281b8afff37a70094dc302d58c5bca..a57eaac9837a4e01f619f2dd98152cb89cfb9d3e 100644 --- a/build-page.sh +++ b/build-page.sh @@ -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 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" @@ -17,7 +17,15 @@ if [ "$IS_PUBLISH_DEPLOYMENT" = true ]; then fi else echo "Using draft deployment strategy" + # Set is_draft to true for draft deployments + yq -i '.is_draft = true' _config.yml fi -echo "Publishing to page root: \"$PAGE_ROOT\"" -bundle exec jekyll build -d public -b "$PAGE_ROOT" +echo "Config file contents after modification:" +cat _config.yml + +echo "Publishing to page root: \"$PAGE_ROOT\"" +bundle exec jekyll build -d public -b "$PAGE_ROOT" --config _config.yml + +echo "Build complete. Contents of public directory:" +ls -R public \ No newline at end of file