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
'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:
php artisan deploySimulating a deployment
Use the --dry-run flag to simulate the deployment without actually deploying anything.
php artisan deploy --dry-runDeploy to a specific target
Use the --target flag to deploy to a specific target.
php artisan deploy --target=test
````
#### Deploy a single file or folder
```bash
php artisan deploy --file=public/.htaccessDeploy without purging old releases
Use the --keep-releases flag to keep all releases on the server.
php artisan deploy --keep-releasesDeploy without flushing caches
Use the --keep-caches flag to keep all caches on the server.
php artisan deploy --keep-cachesRollback
Use the --rollback flag for rolling back the latest release.
php artisan deploy --rollbackOpen 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.
php artisan evolve:ssh