Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

robj's avatar
Level 9

(Forge) Deploying from wrong branch following branch change

Hi all,

I've had a server deploying happily from the master branch of a GitHub repo using the standard Forge feature - I changed that to staging branch in the repo.

It all looks fine and a deployment is triggered when a commit is pushed to staging however looking in the deployment logs it is still pulling from master.

Any thoughts on why this might be happening?

Thanks, RobJ.

0 likes
7 replies
matty-p's avatar

Could you describe your deployment pipeline a bit more? Are you using Envoyer? GitHub Actions? CircleCI? A bit difficult to troubleshoot your issue without more details on the service and the hooks you are using.

robj's avatar
Level 9

Thanks Matty-p, appreciate the time to ask for some clarity. I've edited the title and post.

Yes, so it's in Forge. All vanilla setup there and in Github. We push a change to the repo, webhook to Forge and it takes care of the rest.

My mistake, I hadn't appreciated the channel marking on the forum here is pretty discrete.

Thanks again, RobJ.

jbloomstrom's avatar

Sorry if this sounds like a dumb question, but did you change the deployment branch in Forge? Go to the Apps tab of the site in question and scroll down to Deployment Branch - is that still set to master?

robj's avatar
Level 9

Thanks jbloomstrom, yes I did - and the odd thing is when we push to that branch Forge deploys, but it pulls the master branch.

jbloomstrom's avatar
Level 50

On the same Apps tab. Did you update the deployment script?

Look for a line that says git pull origin master

robj's avatar
Level 9

Duh, read the manual right! Yes, I'd missed that and had just assumed it'd update the script.

Thanks a million :)

1 like

Please or to participate in this conversation.