]> git.zndr.dk Git - vuepress.git/commitdiff
Update deploy.sh
authorJannik ZANDER <jannik@zndr.dk>
Wed, 1 Jan 2020 22:52:53 +0000 (23:52 +0100)
committerJannik ZANDER <jannik@zndr.dk>
Wed, 1 Jan 2020 22:52:53 +0000 (23:52 +0100)
deploy.sh

index ead66ce7dcb8e4974e91f1055889f9cb9beef20d..9000ab114b7c111437d7a25e230c4e677a752d76 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,12 +1,18 @@
 #!/usr/bin/env sh
+curDate=`date --iso-8601`
+curDir=`git rev-parse --show-toplevel`
 
 # abort on errors
 set -e
-
 echo "Building..." 
 yarn build
 
 echo "Copying files..." 
-rm -rf $HOME/public/*
-cp -R build/* $HOME/public
+cd $HOME/projects/website
+git rm -rf .
+git clean -fxd
+git reset
+cp -R $curDir/build/* .
+git add -A && git commit -m"Site updated: ""$curDate"
+git push