From 56b970fb8a285cb0cc572109e997bb3e8982d774 Mon Sep 17 00:00:00 2001 From: Junyu Pu Date: Tue, 21 Aug 2018 13:07:52 +0200 Subject: [PATCH] chore(kotti): script deploy to GitHub pages --- github-deploy.sh | 22 ++++++++++++++++++++++ package.json | 3 ++- www/components/Navbar.vue | 4 ++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 github-deploy.sh diff --git a/github-deploy.sh b/github-deploy.sh new file mode 100644 index 0000000000..01144bca4e --- /dev/null +++ b/github-deploy.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +yarn run build:gh-pages + +# navigate into the build output directory +cd gh-pages/ + +# 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:3YOURMIND/kotti.git master:gh-pages + +cd - diff --git a/package.json b/package.json index 4cb133aff5..fbd2eed56e 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,8 @@ "build:style": "yarn gulp build --gulpfile ./build/gulpstyle.js", "build:doc": "nuxt generate -c build/nuxt.config.js", "build:gh-pages": "DEPLOY_ENV=GH_PAGES nuxt generate -c build/nuxt.config.js", - "dev:docs": "nuxt -c build/nuxt.config.js" + "dev:docs": "nuxt -c build/nuxt.config.js", + "deploy:docs": ". github-deploy.sh" }, "style": "/dist/kotti-style/index.min.css", "version": "0.0.4" diff --git a/www/components/Navbar.vue b/www/components/Navbar.vue index d097fe7d29..35ab77dec2 100644 --- a/www/components/Navbar.vue +++ b/www/components/Navbar.vue @@ -2,10 +2,10 @@