I still need to write an article about hosting my portfolio. It is hosted for free. That article is coming, I promise!
But, in the meantime, I was so blown away with how easy it is to automatically deploy a static website in Netlify + Strapi that I had to share.
Netlify offers a feature called "Build hooks".
These are unique URLs that you can configure for your application to trigger deployments automatically whenever a post request is made to that endpoint.
And with Strapi, build hooks are incredibly easy to integrate.
First, go to the Netlify Deployment Settings in your project, and find the area for Build hooks.
There, you will have an option to create a new build hook. Give it a memorable name, and click save.
Then, copy the URL that is configured for that build hook.
Once that is done, You will want to add the build hook as a webhook in the Strapi Admin panel.
You can do this by going to "Settings > Webhooks" within Strapi.
Once you are in the Webhooks panel, add a new webhook for the URL that you just configured in Netlify.
Paste the URL that you copied from Netlify into the URL field, give the webhook a memorable name, and choose the appropriate settings for when you want to publish your changes automatically!
Isn't that cool?
Once you save your changes, go ahead and try updating some content on your site and see the wonder!