diff --git a/.travis.yml b/.travis.yml index 533bb14..b7137cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,19 @@ sudo: false language: node_js -node_js: "stable" +node_js: stable +env: + global: + - GH_USER_EMAIL="azuciao@gmail.com" + - GH_USER_NAME="azu" +after_success: + - | + + $(npm bin)/set-up-ssh --key "$encrypted_cee6f610cc35_key" \ + --iv "$encrypted_cee6f610cc35_iv" \ + --path-encrypted-key ".travis/github_deploy_key.enc" + + $(npm bin)/update-branch --commands "npm run build:website" + --commit-message "Update website [skip ci]" + --directory "website/public" + --distribution-branch "gh-pages" + --source-branch "master" \ No newline at end of file diff --git a/.travis/github_deploy_key.enc b/.travis/github_deploy_key.enc new file mode 100644 index 0000000..0c28636 Binary files /dev/null and b/.travis/github_deploy_key.enc differ diff --git a/package.json b/package.json index c941879..0a800f5 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "test": "mocha test/ website/test/", "build": "NODE_ENV=production babel src --out-dir lib --source-maps", "watch": "babel src --out-dir lib --watch --source-maps", - "prepublish": "npm run --if-present build" + "prepublish": "npm run --if-present build", + "build:website": "(cd website && npm i && npm run build" }, "keywords": [ "morpheme",