You could probably use Github Actions combined with the Ghost API to do update the post(s) that changed. Something like:
when a commit is pushed to the main branch:
see what markdown files changed / were created
for every changed file:
fetch the post from the Ghost API using the slug
update the post using the Ghost API
for every new file:
create a new post in ghost
Sure - Github actions is a CI/CD tool from Github that lets you do certain things based on different events. The Ghost API allows you to interface with your Ghost blog in a reproducible and stable manner.
The best example of a Github Action w/ Ghost is action-deploy-theme:
Just curious @vikaspotluri123, how could I use action-deploy-theme for blog post/update?
Originally, I was thinking to build the backend watches github files and reflects it with Ghost blog API.
If I can do this by using Github Actions without using any backend, that would be perfect.
You wouldn’t be using action-deploy-theme specifically; that’s just a starting point to writing the automation - you can see how it works, and what it does so you can write your own “on change” handler to update the posts