After you generate a ssh keygen. You get ssh public key at /var/www/.ssh/file-name.pub and insert it into your git repository. In the next time, You can pull latest source code from repository without input password.
Testing with web server user. For example with apache user:
I have written a demo by Laravel framwork. If you want migrate database, you will have to configure environment in Laravel. Create .env file and configure environment.