👷 — Build and deploy on Gitlab pages

This commit is contained in:
Luc Didry 2020-06-04 13:21:07 +02:00
parent 967d5bcc0c
commit f675382218
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C

View File

@ -2,6 +2,7 @@ image: weboaks/node-karma-protractor-chrome
stages:
- test
- pages
# - e2e
cache:
@ -17,6 +18,38 @@ test:
artifacts:
paths:
- coverage/
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- node_modules/
test-build:
stage: test
script:
- yarn install --pure-lockfile
- npx ng build --prod
only:
- master
pages:
stage: pages
script:
- yarn install --pure-lockfile
- npx ng build
- mv dist/framadate/ public/
dependencies:
- test
artifacts:
paths:
- public
expire_in: '2 hours'
only:
- develop
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- node_modules/
policy: pull
#e2e:
# stage: e2e
@ -25,15 +58,15 @@ test:
# - pkill Xvfb
# - npm run e2e
pages:
stage: .post
dependencies:
- test
script:
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master
#pages:
# stage: .post
# dependencies:
# - test
# script:
# - mv coverage/ public/
# artifacts:
# paths:
# - public
# expire_in: 30 days
# only:
# - master