Created
April 26, 2019 13:05
-
-
Save phcostabh/937dd3771163543d80f26ef627b99e6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'recipe/common.php'; | |
set('keep_releases', 5); | |
server('staging', 'staging.chatfood.io', 22) | |
->user('forge') | |
->identityFile() | |
->stage('staging') | |
->env('branch', 'staging') | |
->env('deploy_path', '/home/forge/staging.chatfood.io'); | |
set('repository', '[email protected]:chatfood/chatfood-api.git'); | |
/** | |
* Setup the environment file in the new release | |
*/ | |
task('environment', function () { | |
run('cp /home/forge/staging.chatfood.io/shared/.env {{release_path}}/.env'); | |
})->desc('Environment setup'); | |
// Laravel writable dirs | |
set('writable_dirs', ['storage', 'vendor']); | |
/** | |
* Main task | |
*/ | |
task('deploy', [ | |
'deploy:prepare', | |
'deploy:release', | |
'deploy:update_code', | |
'deploy:vendors', | |
'deploy:symlink', | |
'cleanup', | |
'environment', | |
])->desc('Deploy your project'); | |
after('deploy', 'success'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment