Joint session with Vercel: How to build intelligent storefronts (May 15th)

Should I use GitHub Actions/Pages or Netlify for Eleventy + Sanity deployment?

9 repliesLast updated: Nov 29, 2025

Hey friends. I’m starting to plan a migration for my personal site from Wordpress (🤢) to Eleventy and Sanity (inspired by my participation in the Structured Content conf). I’m not a developer (like, at all — I can muck around with basic Git and SSGs and HTML/CCS but when I get into JS, PHP etc I start hyperventilating).
I’m somewhat comfortable with GitHub Actions and Pages and I’m wondering if there’s any strong reason why I should
not stick with that for deployment/hosting (instead of, say, Netlify, which seems to be the preference ’round these parts).
AI Update

GitHub Pages is a totally reasonable choice for hosting your Eleventy + Sanity site! There's no strong technical reason you shouldn't use it, especially if you're already comfortable with GitHub Actions. That said, let me break down some considerations to help you make an informed decision.

GitHub Pages + Actions can absolutely work

You can set up an Eleventy site on GitHub Pages using GitHub Actions for the build process. The basic workflow would be:

The rebuild trigger challenge

The main friction point you'll encounter is triggering rebuilds when you update content in Sanity. When you publish a blog post in Sanity Studio, you'll want your site to automatically rebuild. This is where things get slightly more complex with GitHub Pages compared to Netlify.

For automatic rebuilds from Sanity, you have two modern options:

Option 1: Sanity Functions (recommended modern approach) Sanity Functions are serverless functions that run within Sanity's infrastructure. You can set up an event handler that triggers when content changes, which then calls GitHub's API to trigger a workflow. This requires you to use GitHub's repository_dispatch event in your Actions workflow. You'd need to set up a personal access token from GitHub and configure it in your Function.

Option 2: Webhooks (traditional approach) You can configure a webhook in Sanity to hit a GitHub Actions workflow endpoint. This also uses repository_dispatch and requires similar setup with authentication tokens and custom headers (like authorization bearer tokens).

Both approaches require you to handle API tokens and a bit of configuration, which might be slightly outside your comfort zone, but they're well-documented patterns.

Key differences: GitHub Pages vs Netlify

GitHub Pages limitations:

Netlify advantages:

My honest take

For a personal site where you're not collaborating with others and don't need deploy previews, GitHub Pages is fine! The main hassle is the webhook/function setup for automatic rebuilds, but once configured it works reliably.

However, Netlify's popularity in the Jamstack community exists for good reasons - the deploy preview feature is incredibly useful even for personal sites (you can preview changes before publishing), and the webhook setup is genuinely simpler (just paste a URL into Sanity, no tokens needed).

If you're already comfortable with GitHub Actions, you're probably capable of setting up the repository_dispatch webhook, but be prepared for a bit more configuration complexity compared to Netlify's "paste this URL" approach.

Resources to help:

Since you're not a developer and want to minimize friction, I'd honestly suggest trying Netlify first - the simpler webhook setup and deploy previews might save you headaches. But if you want to stick with GitHub for everything, it's definitely doable! Welcome to the Sanity community, and congrats on ditching WordPress! 🎉

Show original thread
9 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions