I recently creating sample gatsby with WordPress working fine. Does it require every time to rebuild to gasby when i add new post or blog on WordPress?
Yes. Use webhooks for triggering an automatic rebuild.
Here an example with netlify:
Setup webhook in Netlify
Build & Deploy > Continuous Deployment > Build hooks > Add build hook
Go to your WordPress site’s Admin page (
Settings > Webhooks > Add webhook
Note: this will only cause a rebuild of the site Netlify for new posts, you need to create a separate webhook event to trigger for pages. Although if it can wait, until your next post. Gatsby will pull in those changes to posts too.
Credit goes to this blog post.