From 700cc822cd34f762e80280b0391c38419032fbfb Mon Sep 17 00:00:00 2001 From: Pan Date: Thu, 12 Jul 2018 12:44:53 +0800 Subject: [PATCH] deploy --- deploy.sh | 22 ++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 00000000..07df191d --- /dev/null +++ b/deploy.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +npm run build:prod + +# navigate into the build output directory +cd dist + +# if you are deploying to a custom domain +# echo 'www.example.com' > CNAME + +git init +git add -A +git commit -m 'deploy' + +# if you are deploying to https://.github.io/ +git push -f git@github.com:PanJiaChen/vue-element-admin.git master:gh-pages + +cd - diff --git a/package.json b/package.json index a4fdc6d6..e71409a5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js", "lint": "eslint --ext .js,.vue src", "test": "npm run lint", - "precommit": "lint-staged" + "precommit": "lint-staged", + "deploy": "bash deploy.sh" }, "lint-staged": { "src/**/*.{js,vue}": [