Git Auto Deploy ========================================= Simple tools for git auto deploy in linux Settings --- ### Githooks Copy the contents in [post-receive.sample] to your server's hooks, you may replace the ```url``` and ```token``` with your own settings ### Server Put the files ```auto_deploy.sh``` and ```index.php``` to your website in the same directory. For example, you may access ```index.php``` from the url ```http://myweb.com/auto_deploy/index.php```, also it is to-post url in the githooks Replace your deploy path in ```auto_deploy.sh``` by setting the path value Replace your ```toCheckToken``` and ```validIP``` in ```index.php``` ### Permission Web user should have permission to run the git command! Let's say that your ```nginx``` user is ```www``` (of course you can check this by ```exec(whoami)```), and it's recommended ssh key of ```www``` should be added to this project's SSH deploy key. Usage --- Just with the text ```[deploy]``` included in your commit message, like git commit -m "Bug fix [deploy]" git push Remote handle message may show to you while pushing. FYI --- ```exec``` function is required in ```php.ini```