Skip to content
Permalink
Browse files

Automate GitBook build on push to master with Travis CI (#396)

  • Loading branch information...
salmanulfarzy committed Sep 29, 2018
1 parent 580a4bb commit 31b8a959e4fa0aa21522d122ade51e7269cc0c54
Showing with 15 additions and 4 deletions.
  1. +14 −0 .travis.yml
  2. +1 −4 package.json
@@ -30,3 +30,17 @@ before_script:
- zsh --version
script:
- scripts/tests.sh
jobs:
include:
- stage: deploy gitbook
if: branch = master AND type = push
script:
- npm install --only=dev --ignore-scripts
- npm run docs:build
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
committer-from-gh: true
keep-history: true
local-dir: _book
@@ -18,9 +18,7 @@
"docs:prepare": "gitbook install",
"docs:icons": "cp logos/apple-touch-icon.png _book/gitbook/images/apple-touch-icon-precomposed-152.png && cp logos/favicon.ico _book/gitbook/images",
"docs:serve": "npm run docs:prepare && gitbook serve .",
"docs:build": "npm run docs:prepare && gitbook build && npm run docs:icons",
"docs:publish": "gh-pages -d _book -m \"Updated at $(date +'%a, %d %b %Y, %T, %Z')\" --add",
"docs:deploy": "npm run docs:build && npm run docs:publish"
"docs:build": "npm run docs:prepare && gitbook build && npm run docs:icons"
},
"repository": {
"type": "git",
@@ -40,7 +38,6 @@
},
"homepage": "https://github.com/denysdovhan/spaceship-prompt#readme",
"devDependencies": {
"gh-pages": "^1.1.0",
"gitbook-cli": "^2.3.2",
"gitbook-plugin-anchorjs": "^1.1.1",
"gitbook-plugin-edit-link": "^2.0.2",

0 comments on commit 31b8a95

Please sign in to comment.
You can’t perform that action at this time.