Automatic deploy with git does not work in Ocaweb

Asked

Viewed 601 times

1

Good night, you guys! I’m trying to make an automatic deployment with git directly on the site server in Ocaweb, but it doesn’t work. I followed several tutorials, but I could not, I can send the files to the repository I created in Ocaweb, but when I check if the files went to the public_html folder, it appears the same way I left it.

the content of the post-receive file is this:

#!/bin/sh/
GIT_WORK_TREE=/home/storage/x/xx/xx/sitexxxxxxxx/public_html git checkout -f

I’m setting it wrong?

Thank you anyway

  • Is the repository from Locaweb itself? What happens?

  • Hello @Rodrigorigotti, I believe the problem was not from Locaweb, and after several tests, I was able to solve the problem I describe below:

  • I was creating the post-receive file by windows and sending it by ftp/sftp, and then running chmod and this way it didn’t work, everything worked after I creiei the file by the server itself with vi. then I ran chmod and everything worked. When I saw some tutorials on the internet and tested them I had no idea that it would influence. Another detail is that the path I used was GIT_WORK_TREE=~/public_html and it worked perfectly. I hope this can help anyone who happens to be in the same kind of trouble I’ve been through.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.