/flightplan-git-deploy

Provides flightplan task for git deploys

Primary LanguageJavaScriptMIT LicenseMIT

flightplan-git-deploy

NodeJS/npm module which provides a flightplan task for git deploys

Usage

  • Add a webRoot property to your target options.
  • This should be the path on the remote server where you want to execute a git pull.
  • e.g. /var/www/project-root

There are two methods of using this module:

Use the standalone gitDeploy task

  • Add the standalone gitDeploy task directly to a flightplan instance
// flightplan.js
var plan = require('flightplan');
var gitDeploy = require('flightplan-git-deploy');

plan.target('production', serverConfig, {
    webRoot: '/var/www/project-root'
});

gitDeploy.addToPlan(plan);
  • fly gitDeploy:production

Use the task as part of another task

  • Use in an another flightplan task:
// flightplan.js
var plan = require('flightplan');
var gitDeploy = require('flightplan-git-deploy');

plan.target('production', serverConfig, {
    webRoot: '/var/www/project-root'
});

plan.local('customTask', function(local) {
  // some optional initial local tasks here
});

plan.remote('customTask', function(remote) {
  // some pre deploy code here
  var webRoot = plan.runtime.options.webRoot;
  gitDeploy.gitPull(remote, webRoot);
  // some post deploy code here
});
  • fly customTask:production