deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.42k stars 1.47k forks source link

Add `remote` option to `update_code_strategy` to clone repository in release_path #3464

Open jhhazelaar opened 1 year ago

jhhazelaar commented 1 year ago

Give deployer the option to have the remote repository in the release_path.

We use Statamic and in Statamic there's an option Git Automation, see documentation: https://statamic.dev/git-automation.

The default value of update_code_strategy is archive, but with the Git Automation we need a repository present in the release_path and with the option clone the repository is present but the origin is to a local mirror. But we need the remote origin.

Work around we now use is to set update_code_strategy to 'clone' add een extra remote and push to remote before a new deployment.

Upvote & Fund

Fund with Polar

antonmedv commented 1 year ago

What about adding remote after clone?

jhhazelaar commented 1 year ago

We can do that with every deployment, but we need to change the remote push in Statamic and add an action to the deploy action.

I think this option would be nice because there's no work around needed for deployer or Statamic. I'll wip up a fork and a PR and see if you like it or otherwise you can close it.

antonmedv commented 1 year ago

PR is ok 👍🏻

jhhazelaar commented 1 year ago

@antonmedv added a PR: https://github.com/deployphp/deployer/pull/3466 hoop you like it.

alexflorea2 commented 1 year ago

This is something that I noticed moving from v6 also and feels like a big change that I did not found in the docs.

so bump for PR :)

mwagena commented 1 year ago

Made a new PR on this issue due to the wrong branch being made active after de update_code_strategy action. See: https://github.com/deployphp/deployer/pull/3540