deployer icon indicating copy to clipboard operation
deployer copied to clipboard

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

Open jhhazelaar opened this issue 2 years ago • 6 comments

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

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

jhhazelaar avatar Jan 27 '23 09:01 jhhazelaar

What about adding remote after clone?

antonmedv avatar Jan 27 '23 09:01 antonmedv

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.

jhhazelaar avatar Jan 27 '23 10:01 jhhazelaar

PR is ok 👍🏻

antonmedv avatar Jan 27 '23 10:01 antonmedv

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

jhhazelaar avatar Jan 27 '23 13:01 jhhazelaar

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 :)

alexflorea2 avatar Feb 10 '23 12:02 alexflorea2

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

mwagena avatar Mar 14 '23 09:03 mwagena