[guadec-web] Enhanced deployment script



commit 5c303377d29f0b085dfbf7ca24cfd74d3189fe2f
Author: Oliver Gutierrez <ogutsua gmail com>
Date:   Thu Mar 1 19:39:52 2018 +0000

    Enhanced deployment script

 deploy.sh |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/deploy.sh b/deploy.sh
index ff80e89..1577021 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -23,21 +23,13 @@ if [ ! -d node_modules ]; then
     npm install
 fi
 
-# echo "Preparing output dir"
-# git clone $SOURCE_REPO --branch $OUTPUT_BRANCH --single-branch $OUTPUT_DIR/
-
-echo "Generating theme data"
-grunt
-
-echo "Generating website in $OUTPUT_DIR directory"
-pelican -s publishconf.py -o $OUTPUT_DIR
-
-echo "Publishing data to $OUTPUT_BRANCH branch"
-git checkout $OUTPUT_BRANCH && \
+echo "Generating website"
+grunt && pelican -s publishconf.py -o $OUTPUT_DIR && \
+    echo "Publishing data to $OUTPUT_BRANCH branch" && \
+    git checkout $OUTPUT_BRANCH && \
     git --git-dir=.git --work-tree=$OUTPUT_DIR add $OUTPUT_DIR/. && \
     git commit -m "Updated static website using deploy script on $DATE" && \
-    git push origin $OUTPUT_BRANCH
-
-git checkout $CURR_BRANCH
+    git push origin $OUTPUT_BRANCH && \
+    git reset --hard HEAD && git checkout $CURR_BRANCH
 
 deactivate


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]