From 07012759a15700fb2cf94a3901db7b54a6697d95 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Thu, 4 Apr 2019 11:53:50 +0200 Subject: [PATCH] add deployment of master to stable --- .gitlab-ci.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba945f60..91fa7074 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,33 +7,36 @@ before_script: - bundle install && bundle update pages: - stage: deploy + stage: deploy-develop only: - develop - #- master script: - # build the master version into stable - #- git fetch --tags - #- latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) - #- git checkout $latestTag - #- bundle exec jekyll build -d public - #- mkdir stable - #- mv public/* stable/. - - # build the develop version into latest - #- git checkout -f develop - #- git fetch origin develop - #- git reset --hard origin/develop - bundle exec jekyll build -d public - mkdir latest - mv public/* latest/. # deploy the stable and latest directories - #- mv stable public/. - mv latest public/. + artifacts: + paths: + - public + +pages: + stage: deploy-master + only: + - master + script: + # build the master version into stable + - bundle exec jekyll build -d public + - mkdir stable + - mv public/* stable/. + + # deploy the stable and latest directories + - mv stable public/. + # auto redirect file - #- cp .autoRedirect public/index.html + - cp .autoRedirect public/index.html artifacts: paths: -- GitLab