From ef19ee806563787ac4b2c0bc3f669b2b539ab3a3 Mon Sep 17 00:00:00 2001 From: Kwangjin Lee <k.lee-5@student.tudelft.nl> Date: Wed, 2 Oct 2024 15:04:43 +0200 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b1b3b6..6f7a114 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 -- GitLab