From 1bae3c76b738332935c0d46e17a2199aca2637b7 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Mon, 15 Apr 2019 11:55:00 +0200 Subject: [PATCH] move commands to .ci folder --- .ci/deploy.sh | 28 ++++++++++++++++++++++++++++ .gitlab-ci.yml | 26 +------------------------- 2 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 .ci/deploy.sh diff --git a/.ci/deploy.sh b/.ci/deploy.sh new file mode 100644 index 00000000..3b07b3de --- /dev/null +++ b/.ci/deploy.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# install npm +npm install -g npm@latest yo grunt-cli generator-reveal bower +npm install + +# build the master version into stable +git fetch --tags +latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) +git checkout $latestTag +grunt dist +mkdir stable +mv public/* stable/. + +# build the develop version into latest +git checkout -f develop +git fetch origin develop +git reset --hard origin/develop +grunt dist +mkdir latest +mv public/* latest/. + +# deploy the stable and latest directories +mv stable public/. +mv latest public/. + +# auto redirect file +cp .ci/.autoRedirect public/index.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dcb04a7..5dc5cb26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,31 +7,7 @@ pages: - master script: # install npm - - npm install -g npm@latest yo grunt-cli generator-reveal bower - - npm install - - # build the master version into stable - - git fetch --tags - - latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) - - git checkout $latestTag - - grunt dist - - mkdir stable - - mv public/* stable/. - - # build the develop version into latest - - git checkout -f develop - - git fetch origin develop - - git reset --hard origin/develop - - grunt dist - - mkdir latest - - mv public/* latest/. - - # deploy the stable and latest directories - - mv stable public/. - - mv latest public/. - - # auto redirect file - - cp .autoRedirect public/index.html + - bash .ci/deploy.sh artifacts: paths: -- GitLab