浏览代码

doc deploy script

Evan You 9 年之前
父节点
当前提交
2203bb5eff
共有 4 个文件被更改,包括 16 次插入1 次删除
  1. 1 0
      docs/assets/CNAME
  2. 4 0
      docs/assets/circle.yml
  3. 9 0
      docs/deploy.sh
  4. 2 1
      package.json

+ 1 - 0
docs/assets/CNAME

@@ -0,0 +1 @@
+vuex.vuejs.org

+ 4 - 0
docs/assets/circle.yml

@@ -0,0 +1,4 @@
+general:
+  branches:
+    ignore:
+      - gh-pages

+ 9 - 0
docs/deploy.sh

@@ -0,0 +1,9 @@
+rm -rf _book
+gitbook build
+cp assets/circle.yml _book/circle.yml
+cp assets/CNAME _book/CNAME
+cd _book
+git init
+git add -A
+git commit -m 'update book'
+git push -f git@github.com:vuejs/vuex.git master:gh-pages

+ 2 - 1
package.json

@@ -14,7 +14,8 @@
     "cart": "cd examples/shopping-cart && webpack-dev-server --inline --hot --config ../webpack.shared.config.js",
     "cart": "cd examples/shopping-cart && webpack-dev-server --inline --hot --config ../webpack.shared.config.js",
     "prepublish": "babel src --out-dir lib --presets es2015 --plugins add-module-exports",
     "prepublish": "babel src --out-dir lib --presets es2015 --plugins add-module-exports",
     "test": "eslint src && mocha --compilers js:babel-core/register",
     "test": "eslint src && mocha --compilers js:babel-core/register",
-    "docs": "cd docs && gitbook serve"
+    "docs": "cd docs && gitbook serve",
+    "deploy-docs": "cd docs && ./deploy.sh"
   },
   },
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",