update studios site
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# bless you chris and andy <3
|
||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
MNML_PATH=$(realpath "$DIR/../")
|
||||
|
||||
CLIENT_PUBLIC_DIR="/var/lib/mnml/public/studios"
|
||||
|
||||
TARGET=$1
|
||||
|
||||
cd $MNML_PATH/studios
|
||||
rm -rf dist
|
||||
npm i
|
||||
npm run build
|
||||
|
||||
# client updates
|
||||
echo "syncing studios"
|
||||
rsync -a --delete --delete-excluded "$MNML_PATH/studios/dist/" "$TARGET:$CLIENT_PUBLIC_DIR/"
|
||||
ssh -q "$TARGET" ls -lah "$CLIENT_PUBLIC_DIR"
|
||||
|
||||
echo "restarting nginx service"
|
||||
ssh -q -t "$TARGET" sudo service nginx restart && sleep 1 && systemctl --no-pager status nginx
|
||||
Reference in New Issue
Block a user