Skip to content

Commit

Permalink
Add update satis action to Filament.
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck committed Mar 21, 2024
1 parent adb16ec commit d70e50d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/Filament/Resources/Content/RepositoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Support\Facades\Artisan;
use Spatie\Ssh\Ssh;

class RepositoryResource extends Resource
{
Expand Down Expand Up @@ -83,6 +84,16 @@ function (Repository $record) {
fn () =>
Artisan::call(ImportGitHubRepositoriesCommand::class)
)),
Tables\Actions\Action::make('Update Satis')
->button()
->requiresConfirmation()
->icon('heroicon-o-arrow-path')
->action(fn () => dispatch(function () {
Ssh::create('forge', 'satis.spatie.be')->execute([
'cd satis.spatie.be',
'./bin/satis build',
]);
})),
]);
}

Expand Down

0 comments on commit d70e50d

Please sign in to comment.