
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGitHub 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:
_redirects or _headers files for custom redirects or HTTP headersNetlify advantages:
_redirects and _headers filesMy 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:
repository_dispatch documentation explains how to trigger workflows via webhooksSince 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! 🎉
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store