Browse Source

👷 — Build and deploy on Gitlab pages

develop
Luc Didry 2 years ago
parent
commit
f675382218
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
  1. 55
      .gitlab-ci.yml

55
.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

Loading…
Cancel
Save