name: Docs Site

on:
  pull_request:
    paths:
      - 'docs/**'
      - '.github/workflows/docs-site.yml'
  push:
    branches: [main]
    paths:
      - 'docs/**'
      - '.github/workflows/docs-site.yml'

jobs:
  docs-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - name: Install
        run: npm install
      - name: Build docs
        run: npm run docs:build
