Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Deployer;
- // Project name
- set('application', 'public_html');
- set('default_stage', 'staging');
- // Hosts
- host('your_shortcut_for_your_ssh_in_sshconfig')
- ->configFile('~/.ssh/config')
- ->identityFile('~/.ssh/id_rsa')
- ->set('deploy_path', '~/{{application}}')
- ->set('branch', 'develop')
- ->stage('staging');
- task('deploy', function() {
- cd('{{deploy_path}}');
- run("/usr/local/bin/php artisan down");
- $response = run('git checkout -- .');
- writeln($response);
- writeln('Checking out develop branch...');
- $response = run("git checkout develop");
- writeln($response);
- writeln('Fetching tags...');
- $response = run('git fetch --tags');
- writeln($response);
- writeln('Pulling changes from remote branch...');
- $response = run("git pull origin develop");
- writeln($response);
- writeln('Removing log files...');
- run('echo "" > storage/logs/laravel.log');
- writeln('Disabling maintanence mode...');
- run("/usr/local/bin/php artisan up");
- });
Add Comment
Please, Sign In to add comment