-
Notifications
You must be signed in to change notification settings - Fork 78
/
.travis.yml
58 lines (53 loc) · 1.3 KB
/
.travis.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
54
55
56
57
58
if: (branch = development) OR (branch = master) OR (tag IS present)
language: node_js
node_js: '12'
before_install:
- cd app
- yarn
# Needed to deploy pull request and releases
- pip install awscli --upgrade --user
cache:
yarn: true
before_script:
- cp .env.example .env
- yarn build
- cd ..
script:
- echo "Skip tests" # no test cases for the project
deploy:
# DEVELOPMENT deployment
- provider: s3
bucket: $DEV_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: app/build
region: eu-central-1
on:
branch: development
# STAGING deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: app/build
upload-dir: current
region: eu-central-1
on:
branch: master
# Prepare production deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: app/build
upload-dir: releases/$TRAVIS_TAG
region: eu-central-1
on:
tags: true
- provider: script
script: bash travis/prepare_production_deployment.sh
on:
tags: true