First you generate ssh key in the server
- ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Uploading this public key to deploy keys in GitHub
- Then you create /home/user/.ssh/config file
- Then you clone repository with git clone https://github.com/akilawickey/akilawickey.github.io.git
- create a bash file as sync.sh
- Give privilages to the script by chmod +x sync.sh
- And then put it in cronjob to make it happen peroidly
- just go to terminal and type crotab -e and edit it as following structure