-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
38 lines (35 loc) · 922 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
stages:
- build
- deploy
# build stage
build_app:
image: node:alpine
stage: build
only:
- develop
script:
- npm install
- npm run build
cache:
paths:
- node_modules/
artifacts:
paths:
# build folder
- dist/
expire_in: 1 hour
# production stage
production:
image: python:alpine
stage: deploy
only:
- develop
script:
- pip install awscli
- aws configure set aws_access_key_id "$ACCESS_KEY_ID"
- aws configure set aws_secret_access_key "$SECRET_ACCESS_KEY"
- aws configure set default.region "$REGION"
- aws configure list
- aws --endpoint-url=https://storage.yandexcloud.net s3 rm s3://test.strategywinners.leadersmanagement.com --recursive
- aws --endpoint-url=https://storage.yandexcloud.net s3 sync ./dist/ s3://test.strategywinners.leadersmanagement.com
- echo "end"