From 36c7e6637adc730f458ca0f3a13e0513442a03a8 Mon Sep 17 00:00:00 2001 From: Kwangjin Lee <k.lee-5@student.tudelft.nl> Date: Fri, 23 Aug 2024 12:10:03 +0200 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 521bf6f..105bf81 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,32 +18,12 @@ before_script: build-page: stage: build script: - - | - if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then - echo "Building draft site..." - JEKYLL_ENV=production bundle exec jekyll build --config _config_draft.yml --destination public - elif [[ "$CI_COMMIT_BRANCH" == "publish" ]]; then - echo "Building production site..." - JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public - else - echo "Branch is neither main nor publish. Skipping build." - exit 1 - fi - - cp _config.yml public/ - - cp _config_draft.yml public/ - - cp home.md public/ - - cp -R _includes public/ - - cp -R _layouts public/ - - cp -R _sass public/ - - cp -R assets public/ - - cp Gemfile public/ - - cp Gemfile.lock public/ - - echo "Listing contents of public directory:" - - ls -laR public + - echo $CI_COMMIT_SHA > version.txt + - mkdir -p public + - cp -r * public/ || true # Copy all files, ignoring errors for directories artifacts: paths: - public - expire_in: 1 week rules: - if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish" -- GitLab