Skip to content

Deployment

Evolve comes with built-in rsync file deployment over SSH.

Configure SSH connection

Before running your first deployment, you need configure the SSH connection for your server in the deployment section in the config/evolve.php configuration file.

Example
php
'server' => [
    'user' => env('DEPLOYMENT_USER', 'web161'),
    'host' => env('DEPLOYMENT_HOST', 'web.onlime.ch'),
    'path' => env('DEPLOYMENT_PATH', 'webhome/public_html'),
    ...
],

This example configuration would result in a deployment to web161@web.onlime.ch:~/webhome/public_html/www.

Deployment

Start a full deployment with the deploy command:

bash
php artisan deploy

Simulating a deployment

Use the --dry-run flag to simulate the deployment without actually deploying anything.

bash
php artisan deploy --dry-run

Deploy to a specific target

Use the --target flag to deploy to a specific target.

bash
php artisan deploy --target=test
````

#### Deploy a single file or folder
```bash
php artisan deploy --file=public/.htaccess

Deploy without purging old releases

Use the --keep-releases flag to keep all releases on the server.

bash
php artisan deploy --keep-releases

Deploy without flushing caches

Use the --keep-caches flag to keep all caches on the server.

bash
php artisan deploy --keep-caches

Rollback

Use the --rollback flag for rolling back the latest release.

bash
php artisan deploy --rollback

Open server target with SSH

Use the evolve:ssh command to open a new SSH connection to your configured server. The starting working directory is your configured deployment target.

bash
php artisan evolve:ssh