-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.01 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
language: node_js
node_js:
- '10'
cache:
yarn: true
before_script:
- cp src/environments/environment.ts.SAMPLE src/environments/environment.ts
- sed -ri "s|STITCH_API_URL|$STITCH_API_URL|" src/environments/environment.ts
- sed -ri "s/STITCH_API_SECRET/$STITCH_API_SECRET/" src/environments/environment.ts
script:
- yarn ng build
branches:
only:
- master
before_deploy:
- export UPLOAD_DIR=$(hexdump -n 16 -e '4/4 "%08X" 1 "\n"' /dev/random)
- echo "UPLOAD_DIR = $UPLOAD_DIR"
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
- ruby ./.deploy/slack.rb -c frontend -s initiated -b $TRAVIS_BRANCH
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
bucket: 540-kegomate-artifacts
local-dir: dist/kegomate
upload-dir: $UPLOAD_DIR
on:
all_branches: true
after_deploy:
- ./.deploy/s3_sync.sh
- ./.deploy/cf_invalidation.sh
- ruby ./.deploy/slack.rb -c frontend -s success -b $TRAVIS_BRANCH