-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
80 lines (72 loc) · 1.62 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
image: node:14.17.1
cache:
paths:
- node_modules/
stages:
- test
- build
- build:app
- deploy
before_script:
- npm install --silent
test:
stage: test
before_script:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- apt-get update -qq && apt-get install -y -qq google-chrome-stable
- npm install --silent
script:
- npm run lib:test:ci
build:
stage: build
script:
- npm run lib:build:prod
artifacts:
name: $CI_PROJECT_NAME-$CI_COMMIT_TAG
paths:
- dist/$CI_PROJECT_NAME
only:
- tags
build:app:
stage: build:app
dependencies:
- build
script:
- npm run build:pages
artifacts:
name: $CI_PROJECT_NAME-app-$CI_COMMIT_TAG
paths:
- dist/$CI_PROJECT_NAME-app
only:
- tags
pages:
stage: deploy
dependencies:
- build:app
before_script: []
cache: {}
script:
- mv dist/$CI_PROJECT_NAME-app public
artifacts:
paths:
- public
variables:
GIT_STRATEGY: none
only:
- tags
publish:
stage: deploy
dependencies:
- build
before_script: []
cache: {}
script:
- cd dist/$CI_PROJECT_NAME/
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc
- npm publish --access=public
variables:
GIT_STRATEGY: none
when: manual
only:
- tags