---
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This file is part of nvme.
# Copyright (c) 2026 SUSE LLC
#
# Authors: Daniel Wagner <dwagner@suse.de>

name: Build documentation

on:
  push:
    branches: [master]
    paths:
      - Documentation/**
      - libnvme/doc/**
  pull_request:
    branches: [master]
    paths:
      - Documentation/**
      - libnvme/doc/**

  workflow_dispatch:

jobs:
  build-docs:
    name: build documentation
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/linux-nvme/debian:latest
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - name: Mark repo as safe for git
        run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
      - name: build
        run: |
          scripts/build.sh docs
