Deploy Eleventy to GitHub Pages

Elisabeth

Follow 4 steps. Code examples in these commits 💁🏻‍♀️

  • Create a .github/workflows/build-and-deploy.yml
  • Go to Settings > Pages > Build and deployment. Select Source: GitHub Actions
    (This makes it possible to deploy to GitHub Pages directly from the repo, without using a Marketplace action or a separate gh-pages branch which was an earlier approach)
  • Push a new edit (or to run workflow manually: find Re-run jobs under the Actions tab)
  • Set pathPrefix in eleventy.config.js and for the build script in package.json