PHP code example of mugonat / deploy

1. Go to this page and download the library: Download mugonat/deploy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mugonat / deploy example snippets




namespace Deployer;

loy/utils.php';

// Config (Package Defaults)

set('hook_backup', false);
set('hook_backup_db', true);
set('hook_migrate_auto', true);
set('hook_node_modules', true);
set('hook_deploy_key', true);

add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', []);

// Hosts

host('app.domain.tld')
    ->set('branch', 'deployment/client')
    ->set('http_user', 'site-user')
    ->setRemoteUser('site-user')
    ->setDeployPath('/home/{{remote_user}}/htdocs/{{hostname}}');

// Hooks

after('deploy:failed', 'deploy:unlock');
after('deploy:success', 'artisan:optimize');
after('push', 'artisan:optimize');