What I am looking to do: In order to achieve version control via git; whenever I make changes on the Wordpress site, these changes are push to a GitHub repo. I have other projects where I make changes in git, and those changes are pushed to an S3 bucket holding static site files. However, I have not found anything as of yet, that has insight to what I am trying to do with the former.
Initially, I am thinking I will need a Lambda function that watches for site file changes in the S3 bucket. If a change, trigger a separate Lambda function to push to a GitHub repository.
My question is: How do I go about doing this? Are there existing tutorials on a setup similar to what I am trying to achieve?
In my mind, the concept is pretty straight forward. But, I could use some tips to help me actually implement this.
Current setup: Amazon EC2 (wp site files), RDS (database), S3 bucket (cron job on EC2 to push site files to one bucket and media to another bucket), Content Delivery Network (CDN) for speedier retrieval of the media in S3.