forked from oddbit/tanam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
37 lines (35 loc) · 1.01 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
## #####################################################
## Firebase
##
.deploy_firebase_template: &deploy_firebase_def
image: evenbit/firebase
stage: deploy
cache:
paths:
- .firebase
- dist/node_modules/
- functions/node_modules/
- angular/node_modules/
before_script:
- node --version
- firebase --version
- npm --prefix functions install
- npm --prefix angular install
after_script:
- npm --prefix functions run build:dist
- npm --prefix dist install
- firebase deploy -m "Gitlab pipeline $CI_PIPELINE_ID, build $CI_JOB_ID" --non-interactive --force --token $FIREBASE_DEPLOY_KEY
deploy_firebase_production:
<<: *deploy_firebase_def
environment: Production
only:
- master
script:
- firebase use $FIREBASE_PRODUCTION_PROJECT_ID --token $FIREBASE_DEPLOY_KEY
deploy_firebase_development:
<<: *deploy_firebase_def
environment: Development
only:
- develop
script:
- firebase use $FIREBASE_DEVELOP_PROJECT_ID --token $FIREBASE_DEPLOY_KEY