main-web/build/deploy.sh

14 lines
402 B
Bash

#!/bin/bash
###
# @Author: Haijun Zhang
# @Date: 2022-11-03 09:46:32
# @LastEditTime: 2022-11-14 15:18:08
# @LastEditors: Haijun Zhang
# @Description:
# @FilePath: \main-web-qiankun\build\deploy.sh
###
host=${1:-trunk};
pnpm build;
ssh root@${host} "cd /opt/cmp/consoles/cmc-web;rm -rf static index.html";
scp -r ./cmc-web/static ./cmc-web/index.html root@"${host}":/opt/cmp/consoles/cmc-web;