PHP code example of ekandreas / valet-deploy
1. Go to this page and download the library: Download ekandreas/valet-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/ */
ekandreas / valet-deploy example snippets
date_default_timezone_set('Europe/Stockholm');
uction', 'theserver-dns-or-ip', 22 )
->set('deploy_path','/deploy_path')
->user( 'root' )
->set('branch', 'master')
->stage('production')
->set('database','the_dbname')
->set('domain','www.the-remote-domain.se')
->identityFile();
set('repository', 'https://github.com/path-to-your-repo');
// Symlink the .env file for Bedrock
set('env', 'prod');
set('keep_releases', 10);
set('shared_dirs', ['web/app/uploads']);
set('shared_files', ['.env', 'web/.htaccess', 'web/robots.txt']);
set('env_vars', '/usr/bin/env');
set('writable_dirs', ['web/app/uploads']);
task('deploy:restart', function () {
// Bladerunner example:
// run("rm -f web/app/uploads/.cache/*");
})->desc('Refresh cache');
task( 'deploy', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:vendors',
'deploy:shared',
'deploy:writable',
'deploy:symlink',
'cleanup',
'deploy:restart',
'success'
] )->desc( 'Deploy your Bedrock project, eg dep deploy production' );