0

I have the followings.

  1. Apache server hosted on centos
  2. GitHub (GitHub Actions)
  3. An web app hosted on the local apache server.

Every time I make a change to a local branch and push to remote master branch in GitHub, I have to ssh into the apache server and run git pull origin master. What is the best way and how to set up an automatic pull/deployment on the local server so that it will listen and pull the change automatically?

I have read about GitHub Actions self-hosted runner and ssh solution. but I am not sure how to achieve this in the most efficient way.

1 Answers1

0

You can use GitHub actions to do this by specifically using the action SFTP-Deploy which essentially copies your code from your GitHub repo and places it in your apache server directory.

Radogost
  • 143
  • 5
  • 16