Files

12 lines
585 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
set -e
# webpack 4 在 Node 17+ 下需要旧版 OpenSSL 算法,Node 16 及以下不支持该参数
if [ "$(node -p 'process.versions.node.split(".")[0]')" -ge 17 ]; then
export NODE_OPTIONS="--openssl-legacy-provider"
fi
pnpm run build
zip -q -r dist.zip dist
#黄果落地页地址 :https://hgmj.com
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/hgmj/landpage/dist/ && rm -rf ./* && mv /tmp/extract/dist/* . && rm -rf /tmp/extract /tmp/dist.zip && echo DEPLOY_OK"