function done(err) {
    try {
      callback(err);
    } catch (err2) {
      log('Publish callback threw: %s', err2.message);
    }
  }
Push a git branch to a remote (pushes gh-pages by default).
@param {string} basePath The base path.
@param {Object} config Publish options.
@param {Function} callback Callback.
@return {Promise} A promise.