-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
74 lines (72 loc) · 1.88 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
if: (branch = develop) OR (branch = master) OR (type = pull_request) OR (tag IS present)
sudo: required
dist: bionic
language: node_js
before_install:
# Needed to deploy pull request and releases
- npm i -g yarn
- sudo apt-get -y install python-pip python-dev
- pip install awscli --upgrade --user
cache:
yarn: true
install:
- yarn install
- cd website
- yarn install
- cd ..
matrix:
include:
- if: branch =~ /^master$/ OR tag IS present
env: NODE_ENV=development
node_js: '12'
- if: NOT (branch =~ /^master$/) AND NOT (tag IS present)
env: NODE_ENV=development
node_js: '12'
before_script:
- cd website
- yarn build
- cd ..
script:
- echo "Skip tests" # no test cases for the project
# after_success:
# # Pull Request - Deploy it to a review environment
# # Travis doesn't do deploy step with pull requests builds
# - ./travis/deploy_pull_request.sh
deploy:
- 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: website/build/gnosis-docs
upload-dir: conditionaltokens
region: eu-central-1
on:
branch: develop
node: '12'
- 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: website/build/gnosis-docs
upload-dir: conditionaltokens
region: eu-central-1
on:
branch: master
node: '12'
- provider: s3
bucket: $STAGING_BUCKET_NAME
secret_access_key: $AWS_SECRET_ACCESS_KEY
access_key_id: $AWS_ACCESS_KEY_ID
skip_cleanup: true
local_dir: website/build/gnosis-docs
upload-dir: releases/$TRAVIS_TAG
region: eu-central-1
on:
tags: true
node: '12'
- provider: script
script: ./travis/prepare_production_deployment.sh
on:
tags: true