forked from benfjohnson/developer-dot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (49 loc) · 1.81 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
language: ruby
rvm:
- 2.1
services:
- docker
cache:
bundler: true
before_install:
- nvm install 6.0
# docker specific update and install
- sudo apt-get update
- sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo apt-key fingerprint 0EBFCD88
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install -y docker-ce
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-Linux-x86_64 > ./docker-compose
- chmod +x docker-compose
# without overwriting here docker-compose will be v1.8.1
- sudo mv docker-compose /usr/local/bin
- docker-compose -v
- docker -v
install:
- gem install jekyll
- gem install s3_website
- bundle install
- npm i --progress=false --silent
script:
- npm run lint
- npm run test
- docker-compose up --abort-on-container-exit --exit-code-from server
after_success:
- if [ -n "$ALGOLIA_API_KEY" ]; then bundle exec jekyll algolia push; fi
- if [ -n "$secret_key" ] && [ "$TRAVIS_BRANCH" == "master" ]; then bucket_name=developer.avalara.com s3_website push; fi
before_deploy:
- find _site -iname "*.html" -exec sed -i -e 's/=\"\//=\"\/developer-dot\//g' {} \;
- find _site -iname "style.css" -exec sed -i -e 's/url(\"\//url(\"\/developer-dot\//g' {} \;
- find _site -iname "style.css" -exec sed -i -e 's/url(\//url(\/developer-dot\//g' {} \;
deploy:
- deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: _site
on:
branch: master
condition: "-n $GITHUB_TOKEN"