From 4386d9140ef7e8731c8b8c73b982e8d17e8e65f2 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Fri, 28 Feb 2020 21:52:42 -0500 Subject: [PATCH] Test action by building Hugo docs site (#1) --- .dockerignore | 7 +++++++ .github/workflows/build-docs.yml | 22 ++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/build-docs.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..76464a9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +# Ignore all files... +* + +# ...except readme and licenses: +!LICENSE.md +!README.md +!THIRD_PARTY_NOTICE.md diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..a76ecd2 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,22 @@ +name: Build docs + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout action + uses: actions/checkout@master + with: + fetch-depth: 1 + - name: Checkout gohugoio/hugoDocs + uses: actions/checkout@master + with: + repository: gohugoio/hugoDocs + path: docs/ + fetch-depth: 1 + - name: Build site + uses: ./ + with: + args: --source docs/ --minify --verbose diff --git a/README.md b/README.md index 04b9980..6482101 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # GitHub Action for [Hugo](https://github.com/gohugoio/hugo) ✏️ +![Build docs](https://github.com/jakejarvis/hugo-build-action/workflows/Build%20docs/badge.svg) + This is a simple GitHub Action that contains [Hugo](https://github.com/gohugoio/hugo), the popular static site generator. The [extended version](https://gohugo.io/troubleshooting/faq/#i-get-tocss-this-feature-is-not-available-in-your-current-hugo-version) is now bundled by default. Unlike other actions, this action includes releases going back to [v0.27](https://github.com/gohugoio/hugo/releases/tag/v0.27) (September 2017) for any compatibility requirements. ## Usage