Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Oct 1, 2024
1 parent 6218b9f commit 4ca4c7b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ public static function table(Table $table): Table

}),

Tables\Actions\EditAction::make('deploy')
->label('Deploy')
Tables\Actions\EditAction::make('deployment_script')
->label('Deployment Script')
->icon('heroicon-o-command-line')
->form([
Forms\Components\Textarea::make('deployment_script')
->label('Deployment script')
->required()
->rows(15)
->helperText('Example: composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader')
->columnSpanFull(),
Forms\Components\Toggle::make('quick_deploy')
->label('Quick deploy')
Expand Down
5 changes: 4 additions & 1 deletion web/app/Models/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class GitRepository extends Model
'dir',
'domain_id',
'git_ssh_key_id',
'deployment_script',
'quick_deploy'
];

/**
Expand Down Expand Up @@ -164,6 +166,7 @@ public function pull()
'projectDir' => $projectDir,
'privateKeyFile' => $privateKeyFile,
'selfFile' => $shellFile,
'deploymentScript'=>$this->deployment_script
])->render();

file_put_contents($shellFile, $shellContent);
Expand Down Expand Up @@ -252,7 +255,7 @@ public function clone()
'privateKeyFile' => $privateKeyFile,
'selfFile' => $shellFile,
])->render();

file_put_contents($shellFile, $shellContent);


Expand Down
4 changes: 4 additions & 0 deletions web/resources/views/actions/git/clone-repo-user.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@

@endif

@if($deploymentScript)
{!! $deploymentScript !!}
@endif

rm -rf {{$selfFile}}
4 changes: 4 additions & 0 deletions web/resources/views/actions/git/pull-repo-user.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@

@endif

@if($deploymentScript)
{!! $deploymentScript !!}
@endif

rm -rf {{$selfFile}}

0 comments on commit 4ca4c7b

Please sign in to comment.