Skip to content

cleanup comment

cleanup comment #28

Workflow file for this run

name: Test
on:
push:
branches:
- master
paths-ignore:
- "README.md"
pull_request:
paths-ignore:
- "README.md"
jobs:
test-hugo:
runs-on: ubuntu-latest
strategy:
matrix:
hugo:
- '0.93.0' # min version
- 'latest'
fail-fast: true
steps:
- uses: actions/checkout@v3
# https://github.com/peaceiris/actions-hugo (community action)
- name: Run Hugo ${{ matrix.hugo }}
uses: peaceiris/actions-hugo@v2
with:
hugo-version: ${{ matrix.hugo }}
extended: true
- name: Build with Hugo ${{ matrix.hugo }}
working-directory: exampleSite
run: |
function ver { printf "%03d%03d%03d" $(echo "$1" | tr '.' ' '); }
HUGO_VERSION=$(hugo version | grep -Eo '[0-9]+\.[0-9]+((\.[0-9]+)?)')
# The option changed in 0.93.0: https://github.com/gohugoio/hugo/releases/tag/v0.93.0
I18N_OPT=$([ $(ver $HUGO_VERSION) -lt $(ver 0.93.0) ] && echo "--i18n-warnings" || echo "--printI18nWarnings")
HUGO_THEME="browse" hugo --themesDir ../.. $I18N_OPT -v