#!/bin/bash nginx_dist_path=/etc/nginx/ nginx_dist_path_dir=html current=`date "+%Y%m%d%H%M%S"` echo -e "\e[1;42m拉取git上master分支最新代码\e[0m" git pull origin master echo -e "\e[1;42m开始编译前端应用\e[0m" rm -rf ./dist npm install && npm run build echo -e "\e[1;42m应用编译完毕,开始把dist目录下的文件拷贝到"$nginx_dist_path$nginx_dist_path_dir"\e[0m" rm -rf $nginx_dist_path$nginx_dist_path_dir cp -rf dist $nginx_dist_path$nginx_dist_path_dir echo -e "\e[1;42m正在重启nginx服务\e[0m" systemctl restart nginx systemctl status nginx echo -e "\e[1;42m前端应用部署完毕\e[0m"
nginx部署vue前端工程脚本run.sh
最新推荐文章于 2022-09-05 15:12:01 发布