Files
web_hghl_h5/deploy_prod.sh
T
2026-10-26 21:00:16 +08:00

8 lines
385 B
Bash
Executable File

set -e
rm -rf dist dist.zip
npm run build:prod
zip -q -r dist.zip dist
# https://dis79itlh8uwv.cloudfront.net
scp dist.zip root@172.104.166.87:/tmp/dist.zip
ssh root@172.104.166.87 "set -e && rm -rf /tmp/extract && unzip -q /tmp/dist.zip -d /tmp/extract && cd /server/web_hghl/h5/dist/ && rm -rf ./* && mv /tmp/extract/dist/* . && rm -rf /tmp/extract /tmp/dist.zip && echo DEPLOY_OK"