From 71fe6dbc7f2bd0596392fe20805753a67b00af1f Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Fri, 29 May 2020 22:03:01 +0900 Subject: [PATCH] docs: Add new section for asciidoctor Close #342 --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 9482f1a..09ba24c 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Thanks to this change, we can complete this action in less than a few seconds. - [Tips](#tips) - [⭐️ Read Hugo version from file](#%EF%B8%8F-read-hugo-version-from-file) - [⭐️ Workflow for autoprefixer and postcss-cli](#%EF%B8%8F-workflow-for-autoprefixer-and-postcss-cli) + - [⭐️ Workflow for asciidoctor](#%EF%B8%8F-workflow-for-asciidoctor) - [CHANGELOG](#changelog) - [License](#license) - [About Maintainer](#about-maintainer) @@ -247,6 +248,51 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} ``` +### ⭐️ Workflow for asciidoctor + +Here is an example workflow for a Hugo project using `asciidoctor`. + +```yaml +name: github pages + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.71.1' + extended: true + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7 + + - run: gem install asciidoctor + + - name: Run Hugo + run: | + alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font" + hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} +``` +