-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (33 loc) · 1.04 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
os: linux
dist: bionic # Ubuntu 18.04 :)
language: node_js
node_js:
- lts/*
# These are the only two branches allowed to build and deploy
branches:
only:
- main
- dev
# Install the awscli using apt on Travis so it can be used when the 'deploy.sh' script needs to run
# a aws command.
addons:
apt:
packages:
- "awscli"
env:
- SCRIPTS=$TRAVIS_BUILD_DIR/scripts
# Cache the node_modules to cut down on installing time
cache:
directories:
- ./node_modules
# Install npm packages found in the apps package.json script
install:
- npm install
# Note - Travis config file will cause the Travis env to automatically run the package.json 'test' script first
# so we don't need to set a deploy options here... continue to after success where the 'deploy.sh' will manage the
# rest for the frontend
# Once Travis has completed installing packages and running tests the deploy.sh script will look after
# building, deploying to an S3 bucket and refreshing cloudfront
after_success:
- chmod +x $SCRIPTS/deploy.sh
- $SCRIPTS/deploy.sh