code: function deploy(cmd = '', files = []) {
    if (!['upload', 'replace'].includes(cmd)) {
      throw new Error('shopify-deploy.deploy() first argument must be either "upload", "replace"')
    }
  
    deploying = true
  
    return new Promise((resolve, reject) => {
      themekit({
        args: [
          cmd,
          '--env',
          settings.env,
          ...settings.defaultArgs,
          ...files
        ],
        cwd: settings.deployRoot
      }, (err) => {
        deploying = false
  
        if (err) {
          reject(err)
        } else {
          resolve()
        }
      })
    }).then(() => {
      deploying = false
      return maybeDeploy()
    }).catch((err) => {
      deploying = false
      console.error(err)
      return maybeDeploy()
    })
  }
docs: Deploy to Shopify using themekit.
  
  @param   cmd     String    The command to run
  @param   files   Array     An array of files to deploy
  @return          Promise