Make it an obscure link. Enable IP check. Lots of options!
Auto deploy from a remote git repo to a server
Hello!
I'm looking for a way to deploy from a remote git repository to a server (trying to DigitalOcean's one).
To be honest, I have an idea but It's pretty dangerous. I can use a web-hook on the remote repository (gitlab or bitbucket) to POST my website at some URI for example, https://example.com/git and then the URI will trigger a:
git pull
to get the changes. The problem is, who says that Bob won't do that manually? There needs to be some way to defend against it which I'm not entirely sure. Is it safe enough to assume that it's safe if the request was made by gitlab.com or bitbucket.com?
I believe that services like Forge use a web-hook to "poke" forge.laravel.com and then they SSH into the server and pull the changes (I might be terribly wrong).
What do you think? What would be a safe way to do that?
Please or to participate in this conversation.