diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..4bfe3ce --- /dev/null +++ b/deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +APP_DIR="/opt/build-a-squad" +WEB_DIR="/var/www/html/build-a-squad" + +echo "==> Pulling latest code..." +cd "$APP_DIR" +git pull origin main + +echo "==> Installing dependencies..." +npm install + +echo "==> Building..." +npm run build + +echo "==> Deploying to $WEB_DIR..." +sudo cp -r "$APP_DIR/dist/." "$WEB_DIR/" + +echo "==> Done. $(date)"