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

Update .gitlab-ci.yml file

parent ca60dcb3
No related branches found
No related tags found
1 merge request!4Update 2 files
Pipeline #245018 passed
...@@ -18,32 +18,12 @@ before_script: ...@@ -18,32 +18,12 @@ before_script:
build-page: build-page:
stage: build stage: build
script: script:
- | - echo $CI_COMMIT_SHA > version.txt
if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then - mkdir -p public
echo "Building draft site..." - cp -r * public/ || true # Copy all files, ignoring errors for directories
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
artifacts: artifacts:
paths: paths:
- public - public
expire_in: 1 week
rules: rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish" - if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish"
......
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