vue + node 前端自动化部署到远程服务器

2020-05-28  本文已影响0人  多久以后_Mr

1.在项目中建立 upload

upload.js 内容及说明

upload/config.js 内的内容及说明

使用方法及流程

      安装  npm i chalk ora shelljs node-ssh inquirer compressing -D

      在项目中  upload/config.js配置文件, 配置ssh地址, 用户名, 验证方式,需要上传的目录地址

      在项目中  package.json文件中 加上 "automaticDeploy": "node ./upload/upload.js"

      运行    npm run automaticDeploy (已经安装过之后直接运行)    你就成功了

      另  在部署过程中出现  bash: unzip: command not found    进入远端服务器下载  运行 yum install -y unzip zip 下载解压插件再次运行就行

upload文件夹内容具体在    https://github.com/bgwd666/deploy/tree/master/upload  (我也是参考这位大哥的) 

上一篇下一篇

猜你喜欢

热点阅读