0

I get the data from rest api and I want to be rebuild Automatically again with any changes in the api and database and fetch new data

please help me..

  • 2
    Can you show us some code? – mkEagles Apr 19 '20 at 09:36
  • Which part of the code should I show? In fact, I want to find a way to re-build the project after it is on the server. So I will no longer have access to the code – Mohamad Mirzai Apr 19 '20 at 11:49
  • contentful/netlify or other deployment and data services provide webhooks to trigger deployment based on some change. You can use one of them or write your own webhook when you want to trigger deployment – Shubham Khatri Apr 19 '20 at 12:24
  • but how i can handle in gatsby??? our backend team handle webhook...ok...but What should I do as a frontend dev ? How can I tell Gatsby to do the build again for me after webhook notification? – Mohamad Mirzai Apr 19 '20 at 12:40

1 Answers1

0

You can use webhooks for that, once your api changes, the hooks is triggered and you have to integrate CICD for listen the wenhook triger and build after that.