feat :init
This commit is contained in:
23
deploy-web.sh
Normal file
23
deploy-web.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd /root/xiaozhi-esp32-server-java/web
|
||||
|
||||
# 构建
|
||||
npm run build
|
||||
|
||||
# 备份并部署
|
||||
if [ -d "/var/www/html/dist" ]; then
|
||||
rm -rf /tmp/dist_backup
|
||||
mv /var/www/html/dist /tmp/dist_backup
|
||||
fi
|
||||
|
||||
mv dist /var/www/html/dist
|
||||
|
||||
# 重载nginx
|
||||
nginx -t && nginx -s reload
|
||||
|
||||
echo "前端部署完成"
|
||||
Reference in New Issue
Block a user