-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathDeployCommand.php
More file actions
28 lines (20 loc) · 676 Bytes
/
Copy pathDeployCommand.php
File metadata and controls
28 lines (20 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
declare(strict_types=1);
namespace App\Console;
use Tempest\Console\ConsoleCommand;
use Tempest\Console\HasConsole;
final readonly class DeployCommand
{
use HasConsole;
#[ConsoleCommand('deploy')]
public function __invoke(): void
{
$this->info('Starting deploy');
$this->info('Pulling changes');
passthru("ssh forge@stitcher.io 'cd tempest.stitcher.io && git fetch origin && git reset --hard origin/main'");
$this->success('Done');
$this->info('Running deploy script');
passthru("ssh forge@stitcher.io 'cd tempest.stitcher.io && bash deploy.sh'");
$this->success('Deploy success');
}
}