Skip to content

GitHub Action

Eleventy Action

v1.2 Latest version
Use latest version

Eleventy Action

Build your Eleventy-based static website


Copy and paste the following snippet into your .yml file.

- name: Eleventy Action
  uses: TartanLlama/actions-eleventy@v1.2
Learn more about this action in TartanLlama/actions-eleventy
Choose a version

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]

    runs-on: ubuntu-18.04
      - uses: actions/checkout@master
      - name: Build
        uses: TartanLlama/actions-eleventy@v1.1
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v1.1.0
          PUBLISH_DIR: _site 
          PUBLISH_BRANCH: gh-pages
          GITHUB_TOKEN: ${{ secrets.GITHUB_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: TartanLlama/actions-eleventy@v1.1
    args: --output _dist
    install_dependencies: true