-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
60 lines (55 loc) · 1.27 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
# ------------ Node Version ----------------------
.node-image: &node-image
image: node:latest
# ------------ CI Stages ------------------------
stages:
- build
- lint-frontend
- unit-test
- deploy
# ------------ Build Front End -------------------
build-frontend:
<<: *node-image
stage: build
artifacts:
untracked: true
cache:
paths:
- node_modules/
script:
- yarn install
- yarn run build
# ------------ End of Build Front End ------------
# ------------ Lint Front End --------------------
lint-frontend:
<<: *node-image
stage: lint-frontend
dependencies:
- build-frontend
script:
- yarn run ci:lint
# ------------ End of Lint Front End -------------
# ------------ Unit Test Front End ---------------
test-frontend:
<<: *node-image
stage: unit-test
dependencies:
- build-frontend
script:
- yarn run test:unit
# ------------ End of Unit Test Front End --------
# ------------ Deploy Front End ------------------
pages:
<<: *node-image
stage: deploy
dependencies:
- build-frontend
script:
- mv public public-vue
- mv dist public
artifacts:
paths:
- public
only:
- master
# ------------ End of Deploy Front End -----------