-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
43 lines (36 loc) · 1.16 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
language: node_js
node_js:
- '6'
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- URI_SCHEME: http
- CNAME: dojocon.coderdojo.jp
- BASEURL: ''
- GIT_USER: Kite
- GIT_EMAIL: [email protected]
- GITHUB_RELEASE_REPO: dojocon-japan/dojocon.coderdojo.jp
- RELEASE_BRANCH: &release_branch release
branches:
only:
- master
- *release_branch
before_install:
- rvm install 2.2.2
install:
- npm install
- gem install jekyll html-proofer
script:
- jekyll build
- npm test
- htmlproofer ./_site --check-html --url-ignore "/jp\.linkedin\.com\/in\/tomomikosaka/","/mymckok\.tumblr\.com/","/facebook\.com/","/mainichi\.jp/"
- if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$RELEASE_BRANCH" ]; then exit 0; fi
- if [ ! -f CNAME ]; then touch CNAME; fi
- echo $CNAME > CNAME
- echo url:\ ${URI_SCHEME}://${CNAME} >> _config.yml
after_success:
- git config user.name "${GIT_USER}"
- git config user.email "${GIT_EMAIL}"
- git add --all && git commit -m "Deploy from Travis CI"
- git push -f -q "https://${GITHUB_TOKEN}@github.com/${GITHUB_RELEASE_REPO}.git" HEAD:gh-pages > /dev/null 2>&1
sudo: false