-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
59 lines (56 loc) · 1.09 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
image: node:latest
stages:
- install
- test
- build
- deploy
cache:
paths:
- node_modules/
install:
stage: install
script:
- yarn install
build:
stage: build
script:
- yarn build
artifacts:
name: "$CI_COMMIT_REF_SLUG"
paths:
- build/
test:
stage: test
script:
- CI=true yarn test
deploy_staging:
type: deploy
stage: deploy
image: ruby:latest
environment:
name: staging
url: https://aloha-staging.herokuapp.com
only:
- develop
script:
- echo "Staging deployment"
- apt-get update -yq
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_STAGING_KEY
deploy_production:
type: deploy
stage: deploy
image: ruby:latest
environment:
name: production
url: https://alohaapp.herokuapp.com
only:
- master
- tags
script:
- echo "Production deployment"
- apt-get update -yq
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_PRODUCTION_APP --api-key=$HEROKU_API_PRODUCTION_KEY