Skip to content

11ty GH Pages Action

Actions
Build your Eleventy-based static website
v1.0
Latest
Star (5)

GitHub Action for Eleventy

Use this action to build your static website with Eleventy.

To use it, create a .github/workflows/eleventy_build.yml file which uses this repository as an action.

Here's an example which builds the site with this action, then deploys to GitHub Pages with peaceiris/actions-gh-pages:

name: Eleventy Build
on: [push]

jobs:
  build_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Build
        uses: cjerrington/actions-eleventy@master
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          publish_dir: _site 
          publish_branch: gh-pages
          github_token: ${{ secrets.DEPLOY_TOKEN }}

This action accepts a couple of optional inputs:

Input Name Required? Default Description
args No "" Arguments to pass to the Eleventy invocation
install_dependencies No false If set to true, npm install will be run before Eleventy is invoked

For example:

- name: Build
  uses: cjerrington/[email protected]
  with:
    args: '--output=_dist'
    install_dependencies: true

11ty GH Pages Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Build your Eleventy-based static website
v1.0
Latest

11ty GH Pages Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.