Merge pull request #475 from sgfost/deps/upgrade-hugo-docsy #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run htmltest over rendered content | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
htmltest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read .env hugo version | |
id: hugo-version | |
run: | | |
. ./.env | |
echo "::set-output name=HUGO_VERSION::${HUGO_VERSION}" | |
echo "::set-output name=DOCSY_VERSION::${DOCSY_VERSION}" | |
- name: Add hugo nodejs dependencies | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: 'npm' | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
# sync versions with docker-compose .env ala | |
# https://github.com/marketplace/actions/hugo-setup#%EF%B8%8F-read-hugo-version-from-file | |
hugo-version: "${{ steps.hugo-version.outputs.HUGO_VERSION }}" | |
extended: true | |
- name: Build Hugo site | |
env: | |
HUGO_ENV: "production" | |
run: | | |
npm install | |
hugo --minify --gc -d $GITHUB_WORKSPACE/dist | |
- name: run htmltest | |
continue-on-error: true | |
uses: wjdp/htmltest-action@master | |
with: | |
config: .htmltest.yml | |
- name: archive htmltest results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: htmltest-report | |
path: tmp/.htmltest/htmltest.log | |
retention-days: 5 |