-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
50 lines (42 loc) · 899 Bytes
/
.gitlab-ci.yml
File metadata and controls
50 lines (42 loc) · 899 Bytes
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
variables:
DOCKER_DRIVER: overlay2
image: bowmanhan/node-chrome:latest
cache:
paths:
- node_modules/
- build/
stages:
- build
- test
- deploy
test:
image: bowmanhan/node:10.11.0-alpine
stage: test
environment: dev
script:
- yarn install
- yarn test
build:
stage: build
environment: production
artifacts:
paths:
- build/
script:
- yarn install
- yarn build
deploy:
cache:
policy: pull
image: bowmanhan/node:10.11.0-alpine
stage: deploy
environment: production
only:
- master
script:
- cd build/
- export SSHPASS=$USER_PASS
- find ./ -name '*.map' -delete
- sshpass -e scp -o stricthostkeychecking=no -r . root@b1.calm.gq:/var/www/pomometer/
- sshpass -e ssh root@b1.calm.gq 'chown -R root:nginx /var/www/pomometer/'
- sshpass -e scp -o stricthostkeychecking=no -r . nginx@150.95.156.142:/var/www/pomometer/