Use promises for control-flow in deploy.js