Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/RealOrangeOne/hugo-theme-revealjs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Howard <git@theorangeone.net>2018-01-04 16:52:11 +0300
committerJake Howard <git@theorangeone.net>2018-01-04 16:52:11 +0300
commit1cf3673fdfed10a87f22ebbd5177073c44f6d682 (patch)
tree150e2860772490e26879755992abc14fbc90ab5c
parent69317a1b50bdd9df707ee21faa36964ce9d516ab (diff)
Add deploy script
-rw-r--r--.circleci/deploy.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/.circleci/deploy.sh b/.circleci/deploy.sh
new file mode 100644
index 0000000..b20ae27
--- /dev/null
+++ b/.circleci/deploy.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+if [ "${CIRCLE_BRANCH}" != "master" ]; then
+ echo "Only master branch can be deployed"
+ exit 0
+fi
+
+set -e
+
+DEPLOY_DIR=deploy
+
+git config --global push.default simple
+git config --global user.email $(git --no-pager show -s --format='%ae' HEAD)
+git config --global user.name $CIRCLE_USERNAME
+
+git clone -q --branch=gh-pages $CIRCLE_REPOSITORY_URL $DEPLOY_DIR
+
+cd $DEPLOY_DIR
+rm -rf *
+cp ../exampleSite/public/* . -r
+git add -f .
+git commit -m "Deploy build $CIRCLE_BUILD_NUM [ci skip]" || true
+git push -f