Download the PHP package albertoarena/laravel-netsons-deploy without Composer
On this page you can find all versions of the php package albertoarena/laravel-netsons-deploy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download albertoarena/laravel-netsons-deploy
More information about albertoarena/laravel-netsons-deploy
Files in albertoarena/laravel-netsons-deploy
Package laravel-netsons-deploy
Short Description Deploy Laravel applications to Netsons shared hosting via GitHub Actions (FTP or Git)
License MIT
Informations about the package laravel-netsons-deploy
Laravel Netsons Deploy
Deploy Laravel applications to Netsons shared hosting (cPanel, SSD plans) via GitHub Actions, supporting both FTP upload and SSH/git-clone strategies.
Features
- Two deployment strategies: FTP (incremental sync) and Git (server-side clone)
- Release-based deployments with timestamped directories
- Zero-downtime release switching via proxy
index.php - Shared
.envandstorage/across releases - Automatic cache clearing and rebuilding (with dependency caching for faster builds)
- Database migrations on deploy
- Automatic
key:generateand seeder support on first deploy (auto-detectsspatie/laravel-permission) - Auto-detect env variables from
.env.example(secret-backed and static, with editable values) - Custom
.envvariable management (secret-backed and static values) - Build environment variables (e.g., Vite config)
- Custom post-deploy artisan commands
- Envaudit
.envvalidation (opt-in, default enabled) - Slack deploy notifications (opt-in)
.htaccessmanagement for root and public directories- Configurable FTP root path for different account setups
- Configurable release retention (prune old releases)
- SSH retry resilience (automatic retry on connection timeouts, configurable attempts/delay/timeout)
- SSH cleanup after every deploy
- Works with Netsons SSH (port 65100) and cPanel PHP (
ea-phpXX)
Quick Start
1. Install the package
2. Run the installer
This will:
- Guide you through strategy selection (FTP or Git)
- Publish the config file to
config/netsons-deploy.php - Generate
.github/workflows/deploy.ymlwith your settings - Show the required GitHub Secrets and Variables
3. Configure environment variables
Add secret-backed variables (e.g., DB_PASSWORD), static values (e.g., SESSION_DRIVER=database), or build variables (e.g., VITE_APP_NAME).
4. Configure GitHub Secrets
Add the required secrets to your GitHub repository (Settings > Secrets and variables > Actions). See GitHub Secrets Reference.
5. Deploy
Trigger the workflow from GitHub Actions > Deploy to Netsons > Run workflow.
Strategy Comparison
| Feature | FTP | Git |
|---|---|---|
| How it works | Builds locally, uploads via FTP | Clones repo on server via SSH |
| PHP/Composer | On runner (uploaded with app) | On server (runner skips PHP/Composer) |
| Node/Assets | On runner (uploaded with app) | On runner, uploaded via SCP |
| Requires on server | FTP access | Git + SSH access (SSD 30+ plans) |
| Transfer method | Incremental FTP sync | git clone --depth 1 |
| Speed | Slower (full upload first time) | Faster (shallow clone) |
| Best for | Any Netsons plan | SSD 30+ plans with git |
| Private repos | Supported (uploaded from runner) | Supported via HTTPS + token |
Private repos with Git strategy: Set
GIT_REPOto the HTTPS URL and configureGIT_TOKEN. For same-repo deploys, use${{ github.token }}. See Private Repository Setup.
Usage as a Reusable GitHub Action
You can also use this as a reusable action in your workflow:
See action.yml for all available inputs.
Artisan Commands
netsons:install
Interactive setup wizard. Publishes config and deploy workflow, shows required secrets/variables.
netsons:check
Shows your local configuration, checks that the workflow file exists, and lists required GitHub Secrets/Variables.
netsons:env
Manage custom environment variables for deployment without editing the workflow manually.
Variable types:
- Secret-backed — values from GitHub Secrets (e.g.,
DB_PASSWORD) - Static — fixed values (e.g.,
SESSION_DRIVER=database) - Build — available during asset build (e.g.,
VITE_APP_NAME)
After adding/removing variables, regenerate the workflow:
The installer will prompt you to overwrite the existing workflow. Use --force to skip confirmation prompts.
Configuration
The config file config/netsons-deploy.php covers:
- Strategy —
ftporgit - SSH — host, port (default 65100), user, retry settings (retries, delay, timeout)
- PHP binary — remote path (default
/usr/local/bin/ea-php84) - Deploy path — remote directory (default
public_html) - FTP — host, port, user, password, protocol, root path
- Git — repo URL, branch
- Releases — number to keep (default 5)
- Post-deploy — toggle migrations, cache rebuilding, queue restart
- Seeders — classes to run on first deploy
The netsons-deploy.json file manages:
- Secret-backed env vars — mapped to GitHub Secrets
- Static env vars — fixed values per deployment
- Build env vars — available during asset build
- Custom commands — extra artisan commands for post-deploy
- Seeders — classes to run on first deploy only (auto-detected from
composer.json) - Notifications — Slack webhook for deploy alerts
See Configuration Reference for details.
Documentation
- Configuration Reference
- FTP Strategy Guide
- Git Strategy Guide
- Netsons Setup Guide
- GitHub Secrets Reference
- Troubleshooting
Requirements
- PHP 8.2+
- Laravel 10, 11, 12, or 13
- GitHub Actions
- Netsons shared hosting (cPanel, SSD plans)
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature) - Write tests for your changes
- Ensure all tests pass (
composer test) - Commit your changes
- Push to the branch
- Open a pull request
License
MIT License. See LICENSE for details.
All versions of laravel-netsons-deploy with dependencies
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
laravel/prompts Version ^0.1.6|^0.2.0|^0.3.0