Code Monkey home page Code Monkey logo

autodeploy's Introduction

AutoDeploy

自定部署服务,自动化出来

使用Go语言,基于Beego框架实现的API服务器程序。

目前仅支持 github 的 push 通知

简单使用

在配置文件中根据自行情况配置 配置格式:

HTTPAddr = WEB运行地址
httpport = WEB运行端口
runmode = 运行模式(prod,dev)
[github项目完整地址]
secret= github密钥
sh = shell脚本地址
work = 工作目录,在脚本中可将此此配置项作为环境变量`$WORK`使用

执行命令运行程序:

go run main.go 
//or 
bee run

实例

配置

HTTPAddr = http://yushuangqi.com
httpport = 8080
runmode = prod

[https://github.com/ysqi/ysqi.github.io]
secret = ******
sh = $HOME/blogauto/gitpull.sh
work = $HOME/www/yushuangqi.com

Shell脚本

$HOME/blogauto/gitpull.sh :

#!/bin/sh  
cd $work
git clean -fd && git checkout --force && git pull origin master

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.