-
Notifications
You must be signed in to change notification settings - Fork 41
/
.travis.yml
66 lines (64 loc) · 1.69 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
services:
- docker
matrix:
include:
# client
- language: node_js
os: linux
node_js:
- 8
before_install:
- cd client
- npm i yarn -g
script:
- yarn build
cache:
yarn: true
directories:
- node_modules
before_deploy:
- sudo -H pip install awscli --upgrade
- aws s3 rm s3://${S3_PRODUCTION_BUCKET_NAME} --recursive
- yarn run copy-static
deploy:
on:
branch: master
provider: s3
access_key_id: "$AWS_ACCESS_KEY_ID"
secret_access_key: "$AWS_SECRET_ACCESS_KEY"
region: "$AWS_REGION"
bucket: "$S3_PRODUCTION_BUCKET_NAME"
skip_cleanup: true
local_dir: build
cache_control: max-age=21600
acl: public_read
# server
- sudo: false
language: c
os: linux
addons:
apt:
packages:
- libgmp-dev
- libffi-dev
- libssl-dev
- python-dev
cache:
directories:
- "$HOME/.ghc"
- "$HOME/.cabal"
- "$HOME/.stack"
- "$HOME/.stack-work"
before_install:
- cd server
- mkdir -p ~/.local/bin
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards
--strip-components=1 -C ~/.local/bin '*/stack'
- export PATH=$PATH:$HOME/.local/bin
script:
- stack setup && stack --no-terminal --skip-ghc-check test
- stack install
after_success:
- openssl aes-256-cbc -K $encrypted_988909d5662c_key -iv $encrypted_988909d5662c_iv -in travis-deploy-key.pem.enc -out travis-deploy-key.pem -d
- test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = "false" && sudo
chmod +x ./deploy-server.sh && sudo ./deploy-server.sh travis-deploy-key.pem