Giter Site home page Giter Site logo

action-build-eleventy's Introduction

Build a static site using 11ty

This actions builds a static site using 11ty (eleventy: https://www.11ty.dev/) from the contents of a repository. It assumes that the repository root is the site source, but this can be configured in the workflow. It is intended to be coupled with other actions in the workflow that push the built site to a cdn or webserver. An example workflow shows how to push the built site to google storage.

The default build directory is the $GITHUB_WORKSPACE instantiated when using actions/checkout.

name: "build-site"
on:
  push:
    branches:
      - master

jobs:
  build: # run 11ty
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: mcfitzgerald/action-build-eleventy@master
      with:
        path: $GITHUB_WORKSPACE
    - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
      with:
        service_account_key: ${{ secrets.GCE_SA_KEY }}
    - run: |
       gcloud config set project ${{ secrets.GCE_PROJECT }}
       gsutil rsync -r $GITHUB_WORKSPACE/_site ${{ secrets.GS_BUCKET }}

While I wrote the action, the project template is a complete rip from the template made available at: https://github.com/actions/typescript-action.git.

The build-test workflow is accurate and tests whether or not 11ty tries to build this action's repo. The test in __tests__ is a dummy.

action-build-eleventy's People

Contributors

mcfitzgerald avatar mcfitzgeraldcp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.