Add deployment to the buurtnatuur-repo
This commit is contained in:
parent
0d1499bffe
commit
ba63ac7248
1 changed files with 16 additions and 2 deletions
18
deploy.sh
18
deploy.sh
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
mkdir assets/generated
|
mkdir -p assets/generated
|
||||||
ts-node createLayouts.ts
|
ts-node createLayouts.ts
|
||||||
find -name '*.png' | parallel optipng '{}'
|
find -name '*.png' | parallel optipng '{}'
|
||||||
npm run build
|
npm run build
|
||||||
|
@ -8,6 +8,16 @@ npm run build
|
||||||
if [[ $1 == "production" ]]
|
if [[ $1 == "production" ]]
|
||||||
then
|
then
|
||||||
echo "DEPLOYING TO PRODUCTION!"
|
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/*
|
rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/*
|
||||||
cp -r dist/* /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/
|
cd /home/pietervdvn/git/pietervdvn.github.io/MapComplete/
|
||||||
|
@ -18,6 +28,10 @@ else
|
||||||
cd /home/pietervdvn/git/pietervdvn.github.io/Staging/
|
cd /home/pietervdvn/git/pietervdvn.github.io/Staging/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git add . && git commit -m "New mapcomplete version" && git push
|
git add *
|
||||||
|
git commit -am "New mapcomplete version"
|
||||||
|
git push
|
||||||
cd -
|
cd -
|
||||||
./clean.sh
|
./clean.sh
|
||||||
|
|
||||||
|
echo "DEPLOYED $1"
|
Loading…
Reference in a new issue