1.0.6 • Published 7 years ago

git-auto-deploy v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

git-auto-deploy

git-auto-deploy is the npm module for automatic deploying of node server.It launches the shell script to pull the git from origin and exit the server. Remember to use tools like forever or pm2 to respawn the server process.

NPM #Usage

Add a route for webhook in your framework.
Example for express

var gad = require('git-auto-deploy');
.............................
.............................
app.post('/webhook',function(req,res){
  var secret = "yoursecretkey";
  if(req.body.secret == secret){
    gad.deploy();
  }
}
............................

Example to setup mail address for automatic mail of deploy logs and custom repository setup

----------------------------
var mailOptions={
  from:['"Sender Name" <sender@email.com>'],
  to:['"Receiver Name" <receiver@mail.com>']
};

var mailConfig={
  service:"Gmail",
  auth:{
    user:"username@gmail.com",
    pass:"password"
  }
};

var repo={
  origin:"remote url",
  branch:"branch name"
};

var mail=gad.createMail(mailConfig,mailOptions);
gad.deploy(repo,mail);

For auto update after specified duration use:

setInterval(function(){
  gad.deploy()
},duration);
1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago