-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
51 lines (45 loc) · 921 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
stages:
- build
- test
- deploy
image: node:lts
cache:
paths:
- node_modules
build:
stage: build
script:
- yarn install
- yarn build
artifacts:
paths:
- build/
test:
stage: test
script:
- yarn install
- yarn test
deploy pre production:
stage: deploy
image: ruby
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_REPOSITORY --api-key=$HEROKU_ID
environment:
name: staging
url: https://secondhand-binar-staging.herokuapp.com/
only:
- staging
deploy production:
stage: deploy
image: node:lts
only:
- main
environment:
name: production
url: https://secondhand-binar.vercel.app/
script:
- yarn global add vercel
- DEPLOYMENT_URL=$(VERCEL_ORG_ID=$VERCEL_ORG_ID VERCEL_PROJECT_ID=$VERCEL_PROJECT_ID vercel --confirm -t $VERCEL_TOKEN --prod)