mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-24 00:20:25 +00:00
update
This commit is contained in:
parent
6218b9f602
commit
4ca4c7b04a
5 changed files with 15 additions and 3 deletions
|
@ -105,14 +105,15 @@ class GitRepositoryResource extends Resource
|
|||
|
||||
}),
|
||||
|
||||
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')
|
||||
|
|
|
@ -40,6 +40,8 @@ class GitRepository extends Model
|
|||
'dir',
|
||||
'domain_id',
|
||||
'git_ssh_key_id',
|
||||
'deployment_script',
|
||||
'quick_deploy'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -164,6 +166,7 @@ class GitRepository extends Model
|
|||
'projectDir' => $projectDir,
|
||||
'privateKeyFile' => $privateKeyFile,
|
||||
'selfFile' => $shellFile,
|
||||
'deploymentScript'=>$this->deployment_script
|
||||
])->render();
|
||||
|
||||
file_put_contents($shellFile, $shellContent);
|
||||
|
@ -252,7 +255,7 @@ class GitRepository extends Model
|
|||
'privateKeyFile' => $privateKeyFile,
|
||||
'selfFile' => $shellFile,
|
||||
])->render();
|
||||
|
||||
|
||||
file_put_contents($shellFile, $shellContent);
|
||||
|
||||
|
||||
|
|
|
@ -14,4 +14,8 @@ git clone {{$cloneUrl}} {{$projectDir}}
|
|||
|
||||
@endif
|
||||
|
||||
@if($deploymentScript)
|
||||
{!! $deploymentScript !!}
|
||||
@endif
|
||||
|
||||
rm -rf {{$selfFile}}
|
||||
|
|
|
@ -14,4 +14,8 @@ git pull
|
|||
|
||||
@endif
|
||||
|
||||
@if($deploymentScript)
|
||||
{!! $deploymentScript !!}
|
||||
@endif
|
||||
|
||||
rm -rf {{$selfFile}}
|
||||
|
|
Loading…
Reference in a new issue