mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-22 03:02:20 +00:00
36 lines
589 B
PHP
36 lines
589 B
PHP
<?php
|
|
|
|
namespace App\Jobs\Site;
|
|
|
|
use App\Jobs\Job;
|
|
use App\Models\Site;
|
|
use App\SSHCommands\System\EditFileCommand;
|
|
use Throwable;
|
|
|
|
class DeployEnv extends Job
|
|
{
|
|
protected Site $site;
|
|
|
|
public function __construct(Site $site)
|
|
{
|
|
$this->site = $site;
|
|
}
|
|
|
|
/**
|
|
* @throws Throwable
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
$this->site->server->ssh()->exec(
|
|
new EditFileCommand(
|
|
$this->site->path.'/.env',
|
|
$this->site->env
|
|
)
|
|
);
|
|
}
|
|
|
|
public function failed(): void
|
|
{
|
|
}
|
|
}
|