def create(*args)
      arguments(args, required: [:user, :repo]) do
        permit VALID_DEPLOYMENTS_OPTIONS
        assert_required %w[ ref ]
      end
      params = arguments.params
      params['accept'] ||= PREVIEW_MEDIA

      post_request("repos/#{arguments.user}/#{arguments.repo}/deployments", arguments.params)
    end
def create(*args)
      arguments(args, required: [:user, :repo]) do
        permit VALID_DEPLOYMENTS_OPTIONS
        assert_required %w[ ref ]
      end
      params = arguments.params
      params['accept'] ||= PREVIEW_MEDIA

      post_request("repos/#{arguments.user}/#{arguments.repo}/deployments", arguments.params)
    end
Create a deployment

 @param [Hash] params
 @option params [String] :ref
   Required string. The ref to deploy. This can be a branch, tag, or sha.
 @option params [Boolean] :auto_merge
   Optional boolean. Merge the default branch into the requested.
 @option params [Array] :required_contexts
   Optional array of status contexts verified against commit status checks.
   If this parameter is omitted from the parameters then all unique
   contexts will be verified before a deployment is created. To bypass
   checking entirely pass an empty array. Defaults to all unique contexts.
 @option params [String] :payload
   Optional JSON payload with extra information about the deployment.
   Default: ""
 @option params [String] :payload
   Optional String. Name for the target deployment environment (e.g.,
   production, staging, qa). Default: "production"
 @option params [String] :description
   Optional string. Optional short description.

 @example
  github = Github.new
  github.repos.deployments.create 'user-name', 'repo-name', ref: '...'
  github.repos.deployments.create
     'user-name',
     'repo-name',
     ref: '...',
     description: 'New deploy',
     force: true

 @api public