美文网首页
vue + node 前端自动化部署到远程服务器

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

作者: 多久以后_Mr | 来源:发表于2020-05-28 16:27 被阅读0次

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

    相关文章

      网友评论

          本文标题:vue + node 前端自动化部署到远程服务器

          本文链接:https://www.haomeiwen.com/subject/zfjaahtx.html