From 4381c4dc0aad3de4cef2bcb4495cfb461b1a9a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E6=98=A5?= Date: Fri, 25 Nov 2016 10:10:51 +0800 Subject: [PATCH] sync to github --- package.json | 3 ++- sync.sh | 3 ++- sync_doc.sh | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sync_doc.sh diff --git a/package.json b/package.json index 9f4933fb..aafaf161 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,8 @@ "test": "npm run lint && npm run unit", "authors": "git log --format='%aN <%aE>' | sort -u > AUTHORS.txt", "start": "webpack-dev-server --config build/webconfig.config.js --host 0.0.0.0 & bisheng start -c ./site/bisheng.config.js", - "site": "bisheng build -c ./site/bisheng.config.js && sh post-site.sh", + "site": "bisheng build -c ./site/bisheng.config.js && sh post-site.sh && sh sync_doc.sh", + "sync": "sh sync.sh", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -w -r 0" }, "publishConfig": { diff --git a/sync.sh b/sync.sh index dfa271e0..d05cda11 100644 --- a/sync.sh +++ b/sync.sh @@ -1 +1,2 @@ -echo sync +echo 'beginning sync file to github' +git push --no-verify --mirror "https://github.com/aliqin/atui.git" diff --git a/sync_doc.sh b/sync_doc.sh new file mode 100644 index 00000000..8595d165 --- /dev/null +++ b/sync_doc.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +tempdir=`mktemp -d -t atui.XXXXXX` +workDir=$PWD +tempContent=$tempdir"/*" +git clone https://github.com/aliqin/aliqin.github.io.git $tempdir + +cd $tempdir && rm -rf $tempContent +cd $workDir +cp -r ./_site/* $tempdir +cd $tempdir +git add -A +git commit -m 'doc update' +git push origin master +rm -rf tempdir