name: docs

on:
  push:
    branches:
      - 'main'
    paths:
      - 'www/*'
  pull_request:
    paths:
      - 'www/*'

jobs:
  htmltest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: arduino/setup-task@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
      - uses: actions/setup-go@v2
        with:
          go-version: 1.17
      - run: task docs:build
      - uses: wjdp/htmltest-action@master
        with:
          path: www/site
          config: www/htmltest.yml
