-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
52 lines (47 loc) · 1.14 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
.deploy: &deploy
stage: deploy
image: evenbit/firebase
script:
- firebase use $CI_ENVIRONMENT_SLUG --token $FIREBASE_DEPLOY_KEY
- firebase deploy --non-interactive --token $FIREBASE_DEPLOY_KEY -m "Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID"
.ex: &except-release
only:
- master
except:
variables:
- $CI_COMMIT_MESSAGE =~ /^chore\(release\):.*/
stages:
- build
- deploy
build:
<<: *except-release
stage: build
image: node:10
script:
- git config --global user.name "Runner $CI_RUNNER_DESCRIPTION"
- git config --global user.email "$GITLAB_USER_EMAIL"
- npm install
- npm run release
- npm run build:app
- git push --follow-tags $CI_TOKENIZED_REPOSITORY_URL HEAD:$CI_COMMIT_REF_NAME
cache:
key: '$CI_BUILD_REPO'
paths:
- node_modules/
artifacts:
expire_in: 24 hrs
paths:
- dist/
deploy_staging:
<<: *deploy
<<: *except-release
environment:
name: staging
url: https://css-grid-layout-generator.pw/
deploy_production:
<<: *deploy
<<: *except-release
when: manual
environment:
name: production
url: https://css-grid-layout-generator.pw/