name: Validate docs build
on:
  push:
    paths:
    - docs/**
    branches:
    - main
  pull_request:
    paths:
      - docs/**
    branches:
      - main

jobs:
  validate-docs:
    runs-on: buildjet-4vcpu-ubuntu-2204
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - uses: actions/setup-go@v4
        with:
          cache: false
          go-version: "1.20"
      - run: make init-docs
      - run: make validate-docs
