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

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  (我也是参考这位大哥的) 

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容