name: docs

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

permissions:
  contents: read

jobs:
  htmltest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
      - uses: arduino/setup-task@d665c6beebae46ff3f699d7b2fd3f1959de7153c # v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
      - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
        with:
          go-version: '>=1.19.5'
      - run: task docs:build
      - uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master
        with:
          path: www/site
          config: www/htmltest.yml
