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

Update .gitlab-ci.yml file

parent 5ccb7a39
No related branches found
No related tags found
1 merge request!4Update 2 files
Pipeline #245000 passed
......@@ -20,13 +20,22 @@ build-page:
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 -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:
......@@ -39,8 +48,6 @@ build-page:
deploy-draft:
stage: deploy
needs: ["build-page"]
rules:
- if: $CI_COMMIT_BRANCH == "main"
script:
- |
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy-draft \
......@@ -56,12 +63,12 @@ deploy-draft:
environment:
name: draft
url: https://mude.citg.tudelft.nl/2024/draft
rules:
- if: $CI_COMMIT_BRANCH == "main"
deploy-production:
stage: deploy
needs: ["build-page"]
rules:
- if: $CI_COMMIT_BRANCH == "publish"
script:
- |
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy \
......@@ -76,4 +83,6 @@ deploy-production:
}'
environment:
name: production
url: https://mude.citg.tudelft.nl/2024
\ No newline at end of file
url: https://mude.citg.tudelft.nl/2024
rules:
- if: $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