Skip to content

Quickstart

1. Install the package

Terminal window
composer require albertoarena/laravel-netsons-deploy --dev

2. Run the installer

Terminal window
php artisan netsons:install

This will:

  • Ask you to choose a deployment strategy (FTP or Git)
  • Publish the config file to config/netsons-deploy.php
  • Generate .github/workflows/deploy.yml with your settings
  • Show the required GitHub Secrets and Variables

3. Configure environment variables

Add any custom .env variables your project needs:

Terminal window
php artisan netsons:env add

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)

Then regenerate the workflow:

Terminal window
php artisan netsons:install --force

4. 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:

Terminal window
php artisan netsons:check

Managing env variables later

Use netsons:env to add or remove variables at any time:

Terminal window
php artisan netsons:env # List all
php artisan netsons:env add # Add new
php artisan netsons:env remove # Remove existing
php artisan netsons:install --force # Regenerate workflow

Switching strategies

To switch from FTP to Git (or vice versa):

Terminal window
php artisan netsons:install --strategy=git --force

This overwrites the config with the new strategy and shows the updated secrets/variables list.