Manually Deploy from Branch?
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...?14 Replies
Project ID:
c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf
c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf
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.
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?
The team is actually working on this as we speak, there is a preview out atm but it seems unreliable so far
Ah brilliant
Happy to be a guinea pig if you one
*need
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.
New reply sent from Help Station thread:
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"You're seeing this because this thread has been automatically linked to the Help Station thread.
Doesnt that just deploy from main?
New reply sent from Help Station thread:
Yes it will use the default branch. Sorry I misunderstood. I thought that the OP wanted to deploy from mainYou're seeing this because this thread has been automatically linked to the Help Station thread.
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?
that, or only push to that branch when you want to deploy
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)
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