run update script locally and rsync to remote server
This commit is contained in:
parent
86db797765
commit
6a803c5cf2
13
update.sh
13
update.sh
@ -6,9 +6,11 @@ dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
|
|
||||||
cd "${dir}"
|
cd "${dir}"
|
||||||
|
|
||||||
. /home/tmont/.nvm/nvm.sh
|
if ! which node > /dev/null; then
|
||||||
nvm use
|
#. /home/tmont/.nvm/nvm.sh
|
||||||
yarn install --production --non-interactive --pure-lockfile
|
nvm use
|
||||||
|
yarn install --production --non-interactive --pure-lockfile
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -d "./COVID-19" ]]; then
|
if [[ ! -d "./COVID-19" ]]; then
|
||||||
git clone --depth 1 https://github.com/CSSEGISandData/COVID-19.git
|
git clone --depth 1 https://github.com/CSSEGISandData/COVID-19.git
|
||||||
@ -17,8 +19,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ./public/
|
rm -rf ./public/
|
||||||
|
|
||||||
./generate.js
|
./generate.js
|
||||||
|
|
||||||
rsync -va ./public/ ./live/
|
rsync -vaz ./public/ tmont@tmont.com:/var/www/sites/covid19.tmont.com/live/
|
||||||
echo $(date)
|
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user