Quickstart
1. Install the package
composer require albertoarena/laravel-netsons-deploy --dev2. Run the installer
php artisan netsons:installThis will:
- Ask you to choose a deployment strategy (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 any custom .env variables your project needs:
php artisan netsons:env addVariable 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)
Then regenerate the workflow:
php artisan netsons:install --force4. Configure GitHub Secrets
Add the required secrets to your GitHub repository under Settings > Secrets and variables > Actions. See GitHub Secrets for the full list.
5. Deploy
Go to GitHub Actions > Deploy to Netsons > Run workflow, select your environment, and deploy.
6. Verify
Check your configuration is correct:
php artisan netsons:checkManaging env variables later
Use netsons:env to add or remove variables at any time:
php artisan netsons:env # List allphp artisan netsons:env add # Add newphp artisan netsons:env remove # Remove existingphp artisan netsons:install --force # Regenerate workflowSwitching strategies
To switch from FTP to Git (or vice versa):
php artisan netsons:install --strategy=git --forceThis overwrites the config with the new strategy and shows the updated secrets/variables list.