How to create CD with Github Actions
- using appleboy/ssh-action@master for cd
- see cd.yml for the yml example
- make sure the SSH_KEY is correct. Use the SSH private key. create SSH key in your server and copy the private key to Github Secrets
- make sure to write your public key to authorized keys in server. you can use this command to do that: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- make sure that the server dont ask password while we git pulling it manually. Use this command: "git config credential.helper store" or "git config --global credential.helper store" to store the git credential in cache. after we once again pulling the repo in the server, the git cache our credential. with that when github actions try to pull the repo automatically, it doesnt need to write credentials