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

Update .gitlab-ci.yml file

parent baf2d20c
No related branches found
No related tags found
No related merge requests found
Pipeline #249322 passed
......@@ -10,15 +10,15 @@ variables:
build-page:
stage: build
variables:
JEKYLL_ENV: ${{ CI_COMMIT_BRANCH == "publish" && "production" || "development" }}
JEKYLL_ENV: ${{ CI_COMMIT_BRANCH == "release" && "production" || "development" }}
before_script:
- gem install bundler
- bundle install
- chmod +x ./build-page.sh
script:
- |
if [ "$CI_COMMIT_BRANCH" == "publish" ]; then
echo "Running on publish branch"
if [ "$CI_COMMIT_BRANCH" == "release" ]; then
echo "Running on release branch"
./build-page.sh "/" true
elif [ "$CI_COMMIT_BRANCH" == "main" ]; then
echo "Running on main branch"
......@@ -31,8 +31,8 @@ build-page:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish"
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish"
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "release"
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"
when: always
deploy-draft:
......@@ -69,12 +69,12 @@ deploy-production:
"object_kind": "pipeline",
"object_attributes": {
"status": "success",
"ref": "publish"
"ref": "release"
}
}'
environment:
name: production
url: https://mude.citg.tudelft.nl/2024
rules:
- if: $CI_COMMIT_BRANCH == "publish" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish"
- if: $CI_COMMIT_BRANCH == "release" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"
when: always
\ 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