mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
* resolve issue with EOL * Manual Run * reverse change for manual run of tests * remove logging
30 lines
555 B
PHP
Executable File
30 lines
555 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Actions\Site;
|
|
|
|
use App\Models\Site;
|
|
use Illuminate\Validation\ValidationException;
|
|
|
|
class UpdateDeploymentScript
|
|
{
|
|
/**
|
|
* @throws ValidationException
|
|
*/
|
|
public function update(Site $site, array $input): void
|
|
{
|
|
$script = $site->deploymentScript;
|
|
$script->content = $input['script'];
|
|
$script->save();
|
|
}
|
|
|
|
/**
|
|
* @throws ValidationException
|
|
*/
|
|
public static function rules(): array
|
|
{
|
|
return [
|
|
'script' => ['required', 'string'],
|
|
];
|
|
}
|
|
}
|