From ba63ac72485df70fa1b1bdb25128049c890889fa Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 18 Sep 2020 11:55:36 +0200 Subject: [PATCH] Add deployment to the buurtnatuur-repo --- deploy.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 054195f..a0e84b7 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,6 @@ #! /bin/bash -mkdir assets/generated +mkdir -p assets/generated ts-node createLayouts.ts find -name '*.png' | parallel optipng '{}' npm run build @@ -8,6 +8,16 @@ npm run build if [[ $1 == "production" ]] then echo "DEPLOYING TO PRODUCTION!" + mv /home/pietervdvn/git/buurtnatuur.github.io/CNAME /home/pietervdvn/git/ + mv /home/pietervdvn/git/buurtnatuur.github.io/.git /home/pietervdvn/git/ + rm -rf /home/pietervdvn/git/buurtnatuur.github.io/* + cp -r dist/* /home/pietervdvn/git/buurtnatuur.github.io/ + mv /home/pietervdvn/git/CNAME /home/pietervdvn/git/buurtnatuur.github.io/ + mv /home/pietervdvn/git/.git /home/pietervdvn/git/buurtnatuur.github.io/ + cd /home/pietervdvn/git/buurtnatuur.github.io/ +elif [[ $1 == "groen" ]] +then + echo "DEPLOYING TO BUURTNATUUR" rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ cd /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ @@ -18,6 +28,10 @@ else cd /home/pietervdvn/git/pietervdvn.github.io/Staging/ fi -git add . && git commit -m "New mapcomplete version" && git push +git add * +git commit -am "New mapcomplete version" +git push cd - ./clean.sh + +echo "DEPLOYED $1" \ No newline at end of file