Coder Social home page Coder Social logo

mandy's Introduction

Mandy

📦 前端自动化部署工具

本项目为实验项目,不建议正式环境使用。部署前端项目建议结合 CI/CD 来做自动化。

mandy-demo

功能

  • 可视化的部署流程
  • 可交互的回滚流程
  • 多个前端环境管理
  • 无缝切换部署回滚

安装

# 全局安装
yarn global add mandy

# 本地安装
yarn add mandy --dev

其他安装

git clone 
npm link

使用

命令格式

mandy <command> <environment>

命令列表

  • mandy deploy // 部署
  • mandy rollback // 回滚
  • mandy current // 当前版本信息
  • ···

开始部署

Step 0: 生成配置文件

进入你的项目,运行 mandy generate命令,创建配置文件

执行后,将在当前目录建立 mandy/production.js 配置文件

mandy generate production

Step 1: 编辑配置文件

建议将配置文件添加到 .gitignore,避免泄漏 ssh 信息

// mandy/production.js
module.exports = {
  ssh: {
    host: 'github.com',
    username: 'root',
    password: 'password',
    // privateKey: '/Users/zzetao/.ssh/id_rsa'
    // 更多配置:https://github.com/mscdex/ssh2#client-methods
  },
  keepReleases: 10    // 保存历史版本数量
  workspace: 'build', // {相对路径}  本地待发布文件目录
  deployTo: '/var/www/front_end/github.com', // {绝对路径}  线上部署目录
  verify: true // 是否需要输入验证码验证,默认 true
  tips: {
    deployInfo: '部署时提示信息',
    rollbackInfo: '回滚时提示信息'
  }
}

Setp 2: 开始部署

执行 mandy deploy 命令执行部署任务

mandy deploy production

enjoy ~

Todo

  • !! 重构 !!
  • 回滚版本
  • 查看当前版本信息
  • 任务驱动
  • 部署到多台机器
  • 更多自定义配置
  • 完善文档
  • 调整错误信息抛出

License

MIT © zzetao

mandy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mandy's Issues

【feat】 请教

👏 ███╗ ███╗ █████╗ ███╗ ██╗██████╗ ██╗ ██╗
████╗ ████║██╔══██╗████╗ ██║██╔══██╗╚██╗ ██╔╝
██╔████╔██║███████║██╔██╗ ██║██║ ██║ ╚████╔╝
██║╚██╔╝██║██╔══██║██║╚██╗██║██║ ██║ ╚██╔╝
██║ ╚═╝ ██║██║ ██║██║ ╚████║█████╔╝ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═╝ 请教大神 1图标 2品牌mandy 分别是拿什么实现的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.