deployer 7 choose separate branch for staging #2711
-
What if I want to (temporarily) choose a different branch for deployment to staging? How would I add that to the config:
application: 'our-app'
remote_user: forge
deploy_path: '~/{{hostname}}'
repository: '[email protected]:domain/our-app.git'
php_fpm_version: '8.0'
keep_releases: '10' ..... hosts:
prod:
hostname: 'domain.com'
staging:
hostname: 'staging.domain.com'
branch: 'php8' or is there a more appropriate way? Did use it in new import:
- recipe/laravel.php
- contrib/php-fpm.php
- contrib/npm.php
config:
application: 'domain-app'
remote_user: forge
deploy_path: '~/{{hostname}}'
repository: '[email protected]:domain/domain-app.git'
php_fpm_version: '8.0'
keep_releases: '10'
shared_files:
- '.env'
- '.transip_private_key'
- 'storage/app/exact.api.json'
shared_dirs:
- 'public/uploads'
- 'public/published'
- 'storage/framework/cache'
- 'storage/framework/sessions'
- 'storage/framework/views'
- 'storage/logs'
- 'storage/tls'
- 'storage/app/public'
- 'storage/app/modules'
writable_dirs:
- 'public/uploads'
- 'public/published'
- 'storage/framework/cache/data'
- 'storage/logs'
- 'storage/tls'
- 'storage/app/public'
- 'storage/app/modules'
hosts:
prod:
hostname: 'domain.com'
staging:
hostname: 'staging.domain.com'
branch: 'php8'
tasks:
deploy:
- deploy:prepare
- deploy:vendors
- artisan:storage:link
- artisan:view:cache
- artisan:config:cache
- artisan:optimize
- artisan:migrate
- artisan:queue:restart
- artisan:horizon:terminate
- deploy:publish
after:
deploy:failed: deploy:unlock and did see ep deploy staging
[staging] info deploying php8
task deploy:setup
task deploy:lock
task deploy:release
task deploy:update_code
task deploy:check_env
task deploy:shared
task deploy:writable
task deploy:vendors
task deploy:regenerate_key
task artisan:storage:link
task artisan:view:cache
task artisan:config:cache
task artisan:optimize
task artisan:migrate
task artisan:queue:restart
task artisan:horizon:terminate
task deploy:symlink
task deploy:unlock
task deploy:cleanup
[staging] info successfully deployed! with indication of usage of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Post deployment I did test and saw
so Laravel got updated to latest version as we updated things using |
Beta Was this translation helpful? Give feedback.
Post deployment I did test and saw
so Laravel got updated to latest version as we updated things using
composer update
anddeploy.yml
was added so added a branch this way does seem to work. Also do not see a loss of assets as of yet.