-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
56 lines (47 loc) · 966 Bytes
/
.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
image: node:10.15.3
stages:
- install_dependencies
- build
# - test
- deploy
cache:
paths:
- node_modules/
install_dependencies:
stage: install_dependencies
script:
- npm i
only:
changes:
- package.json
build:
stage: build
script:
- npm run build
artifacts:
paths:
- build/
# unit_test:
# stage: test
# script:
# - npm test
# code_quality:
# stage: test
# script:
# - npm test
# performance:
# stage: test
# script:
# - npm test
deploy as review app:
image: rambabusaravanan/firebase
stage: deploy
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://admin-oalmilktea.web.app
only:
- developer
script:
- firebase use oalmilktea --token $FIREBASE_TOKEN
- firebase target:apply hosting admin admin-oalmilktea
- firebase deploy --only hosting -m "Commit $CI_COMMIT_TITLE Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID" --token $FIREBASE_TOKEN