How do I make gatsby in gitlab watch for changes in contentful then gitlab will automatically deploy it to S3? help
I'm a beginner.
How do I make gatsby in gitlab watch for changes in contentful then gitlab will automatically deploy it to S3? help
I'm a beginner.
First, you should set up your Gatsby site to be built by Gitlab and deployed to S3. Here is an blog post which goes through how to do that. Then you can use the Contentful Gitlab webhook template to setup a webhook which, when content is published in Contentful, will trigger the Gitlab pipeline you've set up above.
Here's an article written by Gitlab about deploying your project on Gitlab to S3. It's not specific to Gatsby or Contentful, but might also be helpful.
first you will need to connect your Contentful and Gatsby. For this, you have to create tokens in Settings > API keys and ADD API KEY. Then you need to write in your .env file these tokens: space id and contentful delivery API token. Besides doing this manually, you can do it via npm run setup, before this command check if you have installed npm. After all this, you can now test Contentful and add some Entries and then develop your Gatsby. Now, you can write the GitLab CI, you have to create 2 jobs in your pipeline: build and deploy, there are a lot of videos how to do it.