a month 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
mainbut I now want to manually deploy new changes instead but I can only redeploy the previous deployment...surely I'm missing something here...?
15 Comments
a month ago
c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf
a month 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.
a month 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?
a month ago
The team is actually working on this as we speak, there is a preview out atm but it seems unreliable so far
a month ago
Ah brilliant
a month ago
Happy to be a guinea pig if you one
a month ago
*need
a month 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.
a month 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"
a month ago
Doesnt that just deploy from main?
a month ago
Yes it will use the default branch. Sorry I misunderstood. I thought that the OP wanted to deploy from main
a month 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?
a month ago
that, or only push to that branch when you want to deploy
a month 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)
a month 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