Include man pages and command reference in userdocs

- Closes: #1488

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-01-17 12:14:46 -07:00
parent ba9fb3c273
commit 875106a79b
3 changed files with 29 additions and 13 deletions

View File

@@ -13,8 +13,6 @@ on:
branches:
- main
- 'v4.*.x'
paths:
- 'userdocs/**'
jobs:
publish:
@@ -29,13 +27,9 @@ jobs:
run: |
sudo apt update
- name: Install LaTeX dependencies
- name: Install dependencies
run: |
sudo apt-get install -f -y texlive-latex-extra latexmk
- name: Install graphviz
run: |
sudo apt-get install -f -y graphviz
sudo apt-get install -f -y texlive-latex-extra latexmk graphviz pandoc
- name: Setup Python
uses: actions/setup-python@v5
@@ -44,10 +38,25 @@ jobs:
run: |
pip install --user --upgrade --upgrade-strategy eager sphinx sphinx-rtd-theme restructuredtext_lint pygments
- name: Include reference docs
run: |
make reference
- name: Include man pages
run: |
mkdir -p userdocs/reference/man5
for f in docs/man/man5/*.5
do
title="$(basename "${f%.5}")"'(5)'
output="userdocs/reference/man5/$(basename "${f%.5}.rst")"
line=$(printf '=%.0s' $(seq ${#title}))
printf "%s\n%s\n%s\n\n" "$line" "$title" "$line" > "$output"
pandoc -f man -t rst "$f" >> "$output"
done
- name: Build web documentation
run: |
cd userdocs
make html
make -C userdocs html
- name: Install SSH key
if: github.event_name != 'pull_request'