forked from MapComplete/MapComplete
Fix deploy script + more robust
This commit is contained in:
parent
664b6800a3
commit
47a4284ff6
3 changed files with 9 additions and 10 deletions
12
deploy.sh
12
deploy.sh
|
|
@ -1,13 +1,13 @@
|
|||
#! /bin/bash
|
||||
|
||||
mkdir -p assets/generated
|
||||
ts-node createLayouts.ts
|
||||
ts-node createLayouts.ts || { echo 'Creating layouts failed' ; exit 1; }
|
||||
find -name '*.png' | parallel optipng '{}'
|
||||
npm run build
|
||||
npm run build || { echo 'Npm build failed' ; exit 1; }
|
||||
|
||||
if [[ $1 == "production" ]]
|
||||
if [[ $1 == "groen" ]]
|
||||
then
|
||||
echo "DEPLOYING TO PRODUCTION!"
|
||||
echo "DEPLOYING TO BUURTNATUUR!"
|
||||
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/*
|
||||
|
|
@ -15,9 +15,9 @@ then
|
|||
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" ]]
|
||||
elif [[ $1 == "production" ]]
|
||||
then
|
||||
echo "DEPLOYING TO BUURTNATUUR"
|
||||
echo "DEPLOYING TO MAPCOMPLETE"
|
||||
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/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue