Manually Deploy from Branch?
charlie
PROOP

2 years ago

There doesn't seem to be a clear way to manually deploy from a branch? I had a server that was auto deploying from main but I now want to manually deploy new changes instead but I can only redeploy the previous deployment…surely I'm missing something here…?

15 Replies

charlie
PROOP

2 years ago

c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf


adam
MODERATOR

2 years ago

There is no button to manually deploy from a branch, but if you change any environment variables then the changes are automatically pulled and your app will deploy from the source.


charlie
PROOP

2 years ago

Ah ok thanks, just wanted to make sure I wasn't missing anything - I could just have an env var I'll toggle. Could you not have a button that just says "Deploy from Source" in the settings that does that in the background? Just feels a little weird I can't deploy at will without and env var workaround?


adam
MODERATOR

2 years ago

The team is actually working on this as we speak, there is a preview out atm but it seems unreliable so far


charlie
PROOP

2 years ago

Ah brilliant


charlie
PROOP

2 years ago

Happy to be a guinea pig if you one


charlie
PROOP

2 years ago

*need


brody
EMPLOYEE

2 years ago

so little correction, changing an environment variable does not pull the latest code, it only redeploys the recent deployment.

yes the team is working on a manual deploy button, but you need to have a branch connected for that button to deploy from anything other than main, meaning you also have automatic deployments on push since there is no way to have a branch connected and disable auto deployments.


jr
EMPLOYEE

2 years ago

You can turn off automatic deploys by disconnecting the branch on the service settings page.

You can also then deploy the latest commit via the command palette "Cmd+K">"Deploy latest commit"


brody
EMPLOYEE

2 years ago

Doesnt that just deploy from main?


jr
EMPLOYEE

2 years ago

Yes it will use the default branch. Sorry I misunderstood. I thought that the OP wanted to deploy from main


charlie
PROOP

2 years ago

Ok that's useful to know, so the current workaround is to just keep the server disconnected until I want to deploy and then switch on auto deploys so it deploys and then re-disconnect it?


brody
EMPLOYEE

2 years ago

that, or only push to that branch when you want to deploy


charlie
PROOP

2 years ago

For context (this might help as to why I want to do this) I have a Web server and a Worker server. The Worker server runs background jobs and is linked to the same GitHub repo as the Web server, so we often make dozens of deploys a day to the Web Server but if there's jobs being run mid way through the Worker server we don't want to interrupt them so that's why I don't want auto-deploys on the Worker server and just want to deploy manually (i.e. when it's safe and no background jobs are running)


adam
MODERATOR

2 years ago

If the two apps are in a monorepo, you can set up a watch path to only redeploy the worker when it’s files are changed


Loading...