From f6753822183d63a53c908017740b0908a600f3cc Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 4 Jun 2020 13:21:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20=E2=80=94=20Build=20and=20deploy?= =?UTF-8?q?=20on=20Gitlab=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da20444d..8a804d93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: weboaks/node-karma-protractor-chrome stages: - test + - pages # - e2e cache: @@ -17,23 +18,55 @@ test: artifacts: paths: - coverage/ + cache: + key: "$CI_COMMIT_REF_NAME" + paths: + - node_modules/ -#e2e: -# stage: e2e -# script: -# - npm i -# - pkill Xvfb -# - npm run e2e +test-build: + stage: test + script: + - yarn install --pure-lockfile + - npx ng build --prod + only: + - master pages: - stage: .post + stage: pages + script: + - yarn install --pure-lockfile + - npx ng build + - mv dist/framadate/ public/ dependencies: - test - script: - - mv coverage/ public/ artifacts: paths: - public - expire_in: 30 days + expire_in: '2 hours' only: - - master + - develop + cache: + key: "$CI_COMMIT_REF_NAME" + paths: + - node_modules/ + policy: pull + +#e2e: +# stage: e2e +# script: +# - npm i +# - pkill Xvfb +# - npm run e2e + +#pages: +# stage: .post +# dependencies: +# - test +# script: +# - mv coverage/ public/ +# artifacts: +# paths: +# - public +# expire_in: 30 days +# only: +# - master