# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl

name: manpage examples

on:
  push:
    branches:
      - master
      - '*/ci'
    paths:
      - 'docs/libcurl/curl_*.3'
      - 'docs/libcurl/opts/*.3'
      - '.github/scripts/verify-examples.pl'
  pull_request:
    branches:
      - master
    paths:
      - 'docs/libcurl/curl_*.3'
      - 'docs/libcurl/opts/*.3'
      - '.github/scripts/verify-examples.pl'

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: render nroff versions
        run: autoreconf -fi && ./configure --without-ssl --without-libpsl && make -C docs

      - name: verify examples
        run: ./.github/scripts/verify-examples.pl docs/libcurl/curl*.3 docs/libcurl/opts/*.3
