Hi! I was curious what methods people use to deploy their sites with a static site generator (in my case, Next.js). I want the production site to be static, but have a non-static version to do previews. We host the production site on S3, but can likely host a preview site elsewhere, if needed. Anyone have thoughts/examples of workflows (drafts, webhooks, etc.) that people use to control when things go to prod while also allowing for edited content to be previewed?
(also, not sure if this channel is the right place for this -- lmk and thanks!)
Mar 8, 2021, 7:45 PM
! The site I'm building is fully static -- pulls from Sanity at build time + exports all the static assets, so I don't need the serverless stuff, but I appreciate the info.
Mar 9, 2021, 8:53 PM
That makes sense -- I think what makes sense for my usecase is to host the production site statically, but have a staging instance hosted either with serverless functs or as a node server to allow for preview! Mostly writing this out since I've been looking all around this Slack for various solutions to problems, so maybe someone will stumble on this one haha
Mar 10, 2021, 4:29 PM
You met the same problem as me. React-query is being used. This is my solution.