code: func (e *Empire) Deploy(ctx context.Context, opts DeployOpts) (*Release, error) {
  	if err := opts.Validate(e); err != nil {
  		return nil, err
  	}
  
  	r, err := e.deployer.Deploy(ctx, opts)
  	if err != nil {
  		return r, err
  	}
  
  	event := opts.Event()
  	event.Release = r.Version
  	event.Environment = e.Environment
  	// Deals with new app creation on first deploy
  	if event.App == "" && r.App != nil {
  		event.App = r.App.Name
  		event.app = r.App
  	}
  
  	return r, e.PublishEvent(event)
  }
docs: // Deploy deploys an image and streams the output to w.