-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
62 lines (55 loc) · 1.13 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
image: node:latest
cache:
paths:
- node_modules
stages:
- build
- deploy
lint:
script:
- yarn install --pure-lockfile
- npm run lint
stage: build
# Unit test
test:
script:
- yarn install --pure-lockfile
- npm test -- --runInBand --coverage
stage: build
# Compile assets
build:
script:
- yarn install --pure-lockfile
- npm run build:prod
stage: build
artifacts:
paths:
- dist
# Deploy production artifact to Firebase Hosting (Master deployment)
firebase:
script:
- npm -g config set user root # Workaround for EACCES issue when run as root
- npm install -g firebase-tools
- firebase deploy --token $FIREBASE_TOKEN
stage: deploy
cache:
key: firebase-tools
paths:
- /usr/local/lib/node_modules
environment:
name: firebase
url: https://bridge.holi0317.net
only:
- master
# Deploy production artifact to GitLab pages (Staging deployment)
pages:
script: mkdir public && cp -R dist/* public/
stage: deploy
artifacts:
paths:
- public
environment:
name: staging
url: https://holi0317.gitlab.io/bridge-calc
only:
- staging