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

Update .gitlab-ci.yml file

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