Improve setup-automated-deploy script

This commit is contained in:
Zura Sekhniashvili
2025-10-31 02:43:32 +04:00
parent d8ea329879
commit 3cd29c7165
3 changed files with 53 additions and 5 deletions

32
CHANGELOG.md Normal file
View File

@@ -0,0 +1,32 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.0] - 2025-01-XX
### Added
- 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
- GitHub Actions workflow generation
- GitHub API integration for automatic secret management
- Support for Laravel 11 and 12
- Comprehensive deployment process (composer install, migrations, storage links, optimizations)
- Interactive deployment with conflict resolution
- Git authentication error handling with deploy key setup
### Features
- One-command deployment to Hostinger shared hosting
- Automated GitHub Actions workflow setup
- Manual and automated deployment options
- SSH key management
- Environment variable configuration
- Configurable deployment options via config file

View File

@@ -2,6 +2,7 @@
"name": "thecodeholic/laravel-hostinger-deploy",
"description": "Laravel package for automated Hostinger deployment with GitHub Actions support",
"type": "library",
"version": "1.0.0",
"license": "MIT",
"keywords": [
"laravel",

View File

@@ -155,12 +155,27 @@ class SetupAutomatedDeployCommand extends Command
if (!$token) {
$this->error('❌ GitHub API token is required.');
$this->line('');
$this->warn('💡 Please provide your GitHub API token:');
$this->line(' 1. Set GITHUB_API_TOKEN in your .env file, or');
$this->line(' 2. Use --token=YOUR_TOKEN option');
$this->warn('💡 How to provide your GitHub API token:');
$this->line(' Option 1: Set GITHUB_API_TOKEN in your .env file');
$this->line(' Option 2: Use --token=YOUR_TOKEN option when running this command');
$this->line('');
$this->info(' Create a token at: https://github.com/settings/tokens');
$this->info(' Required scopes: repo, workflow');
$this->info('🔑 To create a GitHub Personal Access Token:');
$this->line(' 1. Go to: https://github.com/settings/personal-access-tokens');
$this->line(' 2. Click "Generate new token" → "Generate new token (classic)"');
$this->line(' 3. Give your token a descriptive name (e.g., "Hostinger Deploy")');
$this->line(' 4. Set expiration (or no expiration)');
$this->line(' 5. Select the following permissions:');
$this->line('');
$this->info(' 📋 Required Permissions:');
$this->info(' ✓ Contents → Read and write');
$this->info(' (Allows creating/updating files, commits, and branches)');
$this->info(' ✓ Workflows → Read and write');
$this->info(' (Allows creating/updating GitHub Actions workflows)');
$this->info(' ✓ Metadata → Read-only');
$this->info(' (Automatically selected, required for API access)');
$this->line('');
$this->warn(' 6. Click "Generate token" and copy the token immediately');
$this->warn(' ⚠️ You won\'t be able to see it again!');
return false;
}