Lesson 3: Deploy code from bitbucket or github
In last two lessons we learnt about Server side configurations for deploying code on server via bitbucket or github. Read that articles here
Now In this Third and final lesson we will do finat bit of configuration over bitbucket or github. For this we mainly need to add our deploy.php file ( remember we created it on server ? ) path in push webhook of bitbucket or github
This is pretty straightforward.
Step 1. Go to your bitbucket or github repo settings.
Step 2. Look for Deployment keys section and add your id_rsa.pub file content ( remeber you created it on your server through SSH- keygen ? )
Step 3. Go to webhooks section and add your deploy.php url there.
That's it. You are ready to deploy your code of bitbucket or github on server. So now everytime you push your files on bitbucket or github, it will authomatically pushed to your server.
HERE IS BITBUCKET CONFIGURATION HINT.