Remove hostinger:auto-deploy command and update documentation accordingly. Adjust section numbering in README and remove references to the deleted command from CHANGELOG.

This commit is contained in:
Zura Sekhniashvili
2025-10-31 17:35:42 +04:00
parent 5ac928e285
commit 547481a761
4 changed files with 2 additions and 103 deletions

View File

@@ -33,7 +33,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial stable release
- `hostinger:deploy-and-setup-automated` - All-in-one command for deployment and automated setup
- `hostinger:deploy-shared` - Manual deployment to Hostinger shared hosting
- `hostinger:auto-deploy` - Setup automated deployment with manual GitHub secrets configuration
- `hostinger:publish-workflow` - Create GitHub Actions workflow file locally
- `hostinger:setup-automated-deploy` - Setup automated deployment via GitHub API
- SSH key generation and management on Hostinger server

View File

@@ -77,25 +77,7 @@ php artisan hostinger:deploy
---
### 2. Setup Automated Deployment (Manual)
```bash
php artisan hostinger:auto-deploy
```
**What it does:** Generates SSH keys on server and displays GitHub secrets/variables for manual setup
**Required Environment Variables:**
- `HOSTINGER_SSH_HOST`
- `HOSTINGER_SSH_USERNAME`
- `HOSTINGER_SSH_PORT`
- `HOSTINGER_SITE_DIR`
**No options** - Run this command, then manually add the displayed secrets to GitHub
---
### 3. Create GitHub Actions Workflow File
### 2. Create GitHub Actions Workflow File
```bash
php artisan hostinger:publish-workflow
@@ -111,7 +93,7 @@ php artisan hostinger:publish-workflow
---
### 4. Setup Automated Deployment (Via GitHub API)
### 3. Setup Automated Deployment (Via GitHub API)
```bash
php artisan hostinger:setup-cicd

View File

@@ -1,80 +0,0 @@
<?php
namespace TheCodeholic\LaravelHostingerDeploy\Commands;
class AutoDeployCommand extends BaseHostingerCommand
{
/**
* The name and signature of the console command.
*/
protected $signature = 'hostinger:auto-deploy';
/**
* The console command description.
*/
protected $description = 'Setup SSH keys and display GitHub secrets for automated deployment';
/**
* Execute the console command.
*/
public function handle(): int
{
$this->info('🔧 Setting up automated deployment...');
// Validate configuration
if (!$this->validateConfiguration()) {
return self::FAILURE;
}
// Get repository information
$repoInfo = $this->getRepositoryInfo();
if (!$repoInfo) {
$this->error('❌ Could not detect repository information. Please run this command from a Git repository.');
return self::FAILURE;
}
$this->info("📦 Repository: {$repoInfo['owner']}/{$repoInfo['name']}");
// Setup SSH connection
$this->setupSshConnection();
// Test SSH connection
if (!$this->ssh->testConnection()) {
$this->error('❌ SSH connection failed. Please check your SSH configuration.');
return self::FAILURE;
}
$this->info('✅ SSH connection successful');
// Setup SSH keys
if (!$this->setupSshKeys(true)) {
$this->error('❌ Failed to setup SSH keys');
return self::FAILURE;
}
// Display GitHub secrets
$this->displayGitHubSecrets($repoInfo);
// Display next steps
$this->displayNextSteps();
return self::SUCCESS;
}
/**
* Display next steps after manual setup.
*/
protected function displayNextSteps(): void
{
// Display next steps
$this->info('🎉 Setup completed! Next steps:');
$this->line('');
$this->line('1. Add all the secrets shown above to GitHub');
$this->line('2. Add the deploy key to your repository');
$this->line('3. Run: php artisan hostinger:publish-workflow');
$this->line('4. Push your changes to trigger the workflow');
$this->line('');
$this->info('🚀 Your repository will now automatically deploy on push!');
}
}

View File

@@ -5,7 +5,6 @@ namespace TheCodeholic\LaravelHostingerDeploy;
use Illuminate\Support\ServiceProvider;
use TheCodeholic\LaravelHostingerDeploy\Commands\DeploySharedCommand;
use TheCodeholic\LaravelHostingerDeploy\Commands\PublishWorkflowCommand;
use TheCodeholic\LaravelHostingerDeploy\Commands\AutoDeployCommand;
use TheCodeholic\LaravelHostingerDeploy\Commands\SetupAutomatedDeployCommand;
use TheCodeholic\LaravelHostingerDeploy\Commands\DeployAndSetupAutomatedCommand;
@@ -30,7 +29,6 @@ class HostingerDeployServiceProvider extends ServiceProvider
$this->commands([
DeploySharedCommand::class,
PublishWorkflowCommand::class,
AutoDeployCommand::class,
SetupAutomatedDeployCommand::class,
DeployAndSetupAutomatedCommand::class,
]);