Hey hey just a thought since it's kinda fresh in my head. While there isn't a direct "Publish to Web" API endpoint in Notion, you can achieve similar functionality by building a custom solution. Here's how I've implemented something similar:
Without ISR (Manual Updates): When deployed to Vercel without Incremental Static Regeneration (ISR), the site would only update when manually redeployed. This is somewhat similar to Notion's "Publish to Web" feature (in a way, I guess?), where you need to manually trigger an update.
With ISR (Near Real-Time Updates): By implementing ISR with a short revalidation period (e.g., 60 seconds), the website automatically updates with the latest Notion content. This creates a near real-time sync between your Notion database and the published web page.
This method gives you more control over the published output while maintaining a connection to your Notion content. I guess it's not exactly the same as Notion's "Publish to Web", as per your question but it might achieve a similar goal of making your Notion content publicly accessible and regularly updated (am assuming you were wanting to publish Notion content?)