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

aspitzer's avatar

Envoyer pull

Hi!

When we are pushing code to master envoyer is making a new deploy automatically and it finishes correctly. We check the releases ant they look ok but not git pull is done! so actually new code is not on the new deployment.

Do we need to add a git pull hook or something? Shouldn't it be the base of everything?

Now we need to manually ssh to the new release folder and do git pull... (i know we can do it with a manual hook but it does not make sense no? )

0 likes
7 replies
michaeldyrynda's avatar

What are your exact steps to push?

Obviously you're merging your branch changes into the master branch before pushing. Basic, I know, but you need to start at the beginning ;)

Second, Envoyer grabs the tarball of your app and extracts it, it doesn't clone. Grab the hash from Envoyer and cross check it with your code at that commit. Make sure the changes are there. Check github / bitbucket to make sure your code is there.

I made a few deployments today without any issues. The more info you can give us, the easier it will be to troubleshoot :)

aspitzer's avatar

Thanks for the reply @deringer. Yes, ovbiously the code is there. As I said if I log in via console, go to the release folder and do a "git pull" code is downloaded correctly with no merge issues. So I don't really understand the problem.

rikh's avatar

envoyer does not deploy by simply running git pull on the release folder. It actually goes a bit like this....

  • create a new timestamped folder
  • fetch the tarball of the current master commit and unpack it into the new folder
  • composer install
  • any other commands you've set up
  • finally, update the current folder symlink to point at the new folder.

After this process is complete, the contents of your 'current' folder should contain the new code. there will also be a new folder in the releases folder. The symlink will be pointing at the new one in here.

Why does it do all that, instead of just running git pull? Well, the whole way through the process, your site is still being served from the original release. If anything goes wrong with the deployment process (github down, composer install fails, migrations fail etc etc), then Envoyer can just stop and leave your existing working build running without disruption.

aspitzer's avatar

I understand. But then if the process does "fetch the tarball of the current master commit and unpack it into the new folder" and on the master comit there is the last push then last code should be there. But i dont see new code on the new release folder. Maybe something wrong?

michaeldyrynda's avatar

It's interesting that you say a git pull grabs in your updated code. As Envoyer pulls a copy of the tarball of your app, not run a git clone, I wonder how you're able to run any git commands without a git init first - it's not a git repository.

Is this an application you deployed to a new Forge-provisioned server with Envoyer from the start, or one you updated from some other method of deployment?

I used Envoyer and Forge for the first time last week (when Envoyer launched) and have had no issues in the multiple deployments I've used it for.

michaeldyrynda's avatar

Yeah, just double checked a project I have deployed multiple times with Envoyer:

forge@hostname:~/default/current$ git status
fatal: Not a git repository (or any of the parent directories): .git

I'm curious as to what would be different in your instance.

aspitzer's avatar

Ye sin my case it has a git repository started cause project was not initially deployed with envoyer. It was working with forge deployment before.

I have confirmed that the "Clone New Release" actually does not download the latest code.

I still need to do the git pull manually in order to axctually get last code.

Please or to participate in this conversation.