-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
53 lines (47 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
52
53
stages:
- build
- deploy
.build: &build
image: node:13
stage: build
script:
- yarn audit --groups dependencies
- yarn install
- yarn build
artifacts:
expire_in: 30 minutes
paths:
- build
build:latest:
<<: *build
before_script:
- echo "$STAGE_ENV" > .env
except:
- master
- /^release/
build:release:
<<: *build
artifacts:
expire_in: 12 hours
paths:
- build
before_script:
- echo "$STAGE_ENV" > .env
only:
- master
- /^release/
.deploy: &deploy
image: dockito/lftp-client
stage: deploy
deploy:dev:
<<: *deploy
script:
- lftp -e 'mirror -R build /safesafe-dev; bye' -u $STAGE_FTP_USER,$STAGE_FTP_PASS $STAGE__FTP_HOST
when: manual
deploy:stage:
<<: *deploy
script:
- lftp -e 'mirror -R build /safesafe-stage; ; bye' -u $STAGE_FTP_USER,$STAGE_FTP_PASS $STAGE__FTP_HOST
only:
- master
- /^release/