From 0406d41512339770cbf1142203537ed2ce027761 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Thu, 2 Jul 2020 12:32:53 +0200 Subject: [PATCH] fix rules --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa368018..8b1394f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,12 +15,16 @@ retrieve:repo: expire_in: 1 day paths: - courses.lcsb.uni.lu + rules: + - if: $CI_COMMIT_BRANCH == "develop" + - if: $CI_COMMIT_BRANCH == "master" generate:index: image: python stage: generate rules: - if: $CI_COMMIT_BRANCH == "develop" + - if: $CI_COMMIT_BRANCH == "master" script: - python .ci/generateIndex.py artifacts: @@ -31,6 +35,9 @@ generate:index: build:website: image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb stage: build + rules: + - if: $CI_COMMIT_BRANCH == "develop" + - if: $CI_COMMIT_BRANCH == "master" before_script: - cd courses.lcsb.uni.lu - gem install bundler -v2.0.2 @@ -53,6 +60,7 @@ build:courses: stage: build rules: - if: $CI_COMMIT_BRANCH == "develop" + - if: $CI_COMMIT_BRANCH == "master" before_script: - git submodule update --recursive --init script: @@ -74,7 +82,8 @@ upload: - echo "$KNOWNHOSTS" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts rules: - - if: '$CI_COMMIT_BRANCH == "develop"' + - if: $CI_COMMIT_BRANCH == "develop" + - if: $CI_COMMIT_BRANCH == "master" script: - scp -P $SSHPORT -r site/* $SSHCONNECT:~/web/latest - scp -P $SSHPORT -r public/* $SSHCONNECT:~/web/latest -- GitLab