Permalink
Browse files

Let Travis auto-deploy to gh-pages on master changes

  • Loading branch information...
1 parent 13fe74d commit c0f7b275252fa5c0cde64af933c524b31f6d1048 @kvz committed May 3, 2016
Showing with 18 additions and 17 deletions.
  1. +14 −15 .travis.yml
  2. +1 −1 CHANGELOG.md
  3. +2 −0 env.example.sh
  4. +1 −1 package.json
View
@@ -1,22 +1,21 @@
language: node_js
node_js:
- - 4.4.2
- - 0.12
- - 0.10
+- 4.4.2
+- 0.12
+- 0.1
sudo: false
matrix:
allow_failures:
- - node_js: 4.4.2
+ - node_js: 0.1
- node_js: 0.12
-# addons:
-# apt:
-# sources:
-# - ubuntu-toolchain-r-test
-# packages:
-# - gcc-4.8
-# - g++-4.8
-# - php5-cli
script:
- - npm run lint
- - npm run build
- - npm run test
+- npm run lint
+- npm run build
+- npm run test
+- git config --global user.name 'Locutus Bot'
+- git config --global user.email 'bot@locutusjs.io'
+- sed -i.bak -e "s~git@github.com:kvz/locutus.git~${GHPAGES_URL}~" website/_config.yml && rm -f website/_config.yml.bak
+- if [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then npm run deploy; else echo "Skipping for non-master/prs"; fi
+env:
+ global:
+ - secure: "c4unKozz+OKffwUmypDb+E8qcR9JM7tb7fQ75jidOiz57HM5hmLVJokj017GrUeoPAw3nSE6l0O9Yvyf5K4QNguZ4IXlrtTO1repPLHyUCX3Hoo3PhXDo6g6ySpt8tMpP3dX6r7JUn5YHjxASfOI8VJTmcnxyNkVH66H6VMOA2I="
View
@@ -34,7 +34,7 @@ Released: Not yet
- [ ] Address the 25 remaining test failures that are currently skipped (find out which ones via `npm run test:languages:noskip`)
- [ ] website: Add social buttons
- [ ] website: Render authors server-side
-- [ ] website: Auto-deploys of `master` to http://locutusjs.io via Travis CI
+- [x] website: Let Travis auto-deploy to gh-pages on master changes
- [x] website: Use Hexo deploy vs bash script
## v2.0.2
View
@@ -0,0 +1,2 @@
+export GHPAGES_URL="https://xxxxxxxx@github.com/kvz/locutus.git"
+# travis encrypt --add GHPAGES_URL=${GHPAGES_URL}
View
@@ -72,7 +72,7 @@
"test:module": "babel-node test/module/module.js",
"test:util": "mocha --compilers js:babel-register --reporter spec test/util/",
"test": "npm-run-all test:*",
- "website:deploy": "npm run website:inject && npm run website:build && cd website && hexo deploy",
+ "website:deploy": "npm run website:inject && npm run website:build && cd website && hexo deploy --silent",
"website:inject": "rimraf website/source/{c,golang,php,python,ruby} && babel-node src/_util/cli.js injectweb",
"website:install": "cd website && npm install",
"website:start": "cd website && hexo server",

0 comments on commit c0f7b27

Please sign in to comment.