Skip to content

Instantly share code, notes, and snippets.

@hardfire
Created May 18, 2020 06:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save hardfire/6ad7f7ec80ebc96be80820fb7f51b7f0 to your computer and use it in GitHub Desktop.
Save hardfire/6ad7f7ec80ebc96be80820fb7f51b7f0 to your computer and use it in GitHub Desktop.
Use this action to build an eleventy site and push to gh-pages
name: Eleventy Build
on: [push]
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build using node.ks
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install
- run: npm run build --if-present
- name: Deploy
uses: peaceiris/actions-gh-pages@v1.1.0
env:
PUBLISH_DIR: _site
PUBLISH_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment