Skip to content

Commit 15f36db

Browse files
committedJul 13, 2022
feat: add test and deploy staging
1 parent c9f3d7f commit 15f36db

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed
 

‎.gitlab-ci.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
11
stages:
22
- build
3+
- test
34
- deploy
45

5-
build job:
6+
image: node:lts
7+
8+
cache:
9+
paths:
10+
- node_modules
11+
12+
build:
613
stage: build
7-
image: node:lts
814
script:
915
- yarn install
1016
- yarn build
1117
artifacts:
1218
paths:
1319
- build/
1420

21+
test:
22+
stage: test
23+
script:
24+
- yarn install
25+
- yarn test
26+
27+
deploy pre production:
28+
stage: deploy
29+
image: ruby
30+
script:
31+
- apt-get update -qy
32+
- apt-get install -y ruby-dev
33+
- gem install dpl
34+
- dpl --provider=heroku --app=$HEROKU_REPOSITORY --api-key=$HEROKU_ID
35+
environment:
36+
name: staging
37+
url: https://secondhand-binar-staging.herokuapp.com/
38+
only:
39+
- staging
40+
1541
deploy production:
1642
stage: deploy
1743
image: node:lts

0 commit comments

Comments
 (0)
Please sign in to comment.