使用git自动部署网站

Today I try to deploy my website automatically. On our master-branch (running live on our website) is the current running website and on the develop-branch (running live on test.ourwebsite.com with password) is our current test space. Today we copy the files after a commit to the master/develop-branch to the server. Is it possible to deploy the files automatically after a commit to master/develop on our webserver ?

My only idea is to pull in a small interval every time our branches. But then I need for the develop-branch a really high interval.

We use currently the bitbucket.com cloud space and maybe we can use the webhooks.