Skip to content

Commit 6ffe7e7

Browse files
authored
Add workflow for building documentation (#872)
* .github/workflows/docs.yml: New workflow * Makefile (TEXICMD): Fail build on errors (doc-clean): Use make foreach for removing doc build artifacts. (Avoid bash brace expansion.) Remove README.md.html and README.toc.md.
1 parent 8af4e68 commit 6ffe7e7

3 files changed

Lines changed: 52 additions & 5 deletions

File tree

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# .github/workflows/docs.yml
2+
name: Build Docs
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
paths:
9+
- 'man/**'
10+
- '**.md'
11+
12+
jobs:
13+
build-docs:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: ubuntu:24.04
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |
23+
apt-get update
24+
apt-get install -y \
25+
make \
26+
pandoc \
27+
python3-pip \
28+
texinfo \
29+
texlive-plain-generic
30+
pip3 install md-toc --break-system-packages
31+
32+
- name: Build docs
33+
run: |
34+
make doc-regenerate

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2026-02-25 Mats Lidell <matsl@gnu.org>
2+
3+
* .github/workflows/docs.yml: New workflow
4+
5+
* Makefile (TEXICMD): Fail build on errors
6+
(doc-clean): Use make foreach for removing doc build artifacts. (Avoid
7+
bash brace expansion.) Remove README.md.html and README.toc.md.
8+
19
2026-02-19 Bob Weiner <rsw@gnu.org>
210

311
* hui.el (hui:link-possible-types): Fix to include link-to-wikiword only if

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ EMACS = \emacs
129129
SITE_PRELOADS =
130130

131131
# Command used to build the .info version of the user manual.
132-
TEXICMD = texi2any
132+
TEXICMD = texi2any --error-limit=0
133133
# Ensure punctuation generated by $(TEXICMD) is ascii, not unicode (requires texi2any 7.0 or above).
134134
TEXI2INFO = $(TEXICMD) --no-split -c ASCII_PUNCTUATION=1
135135
# Command used to build the .html version of the user manual.
@@ -395,9 +395,12 @@ version:
395395
doc: version README.md.html manual
396396

397397
# Convenience targets for regenerating the docs
398+
DOC_SUFFIXES = log aux cp cpz fn fns ky toc vr vrs info pdf html
398399
.PHONY: doc-clean doc-regenerate
399400
doc-clean:
400-
$(RM) man/hyperbole.{log,aux,cp*,fn*,ky*,toc,vr*,info,pdf,html}
401+
$(RM) $(foreach suf,$(DOC_SUFFIXES),$(man_dir)/hyperbole.$(suf))
402+
$(RM) README.md.html README.toc.md
403+
401404
doc-regenerate: doc-clean doc
402405

403406
# Build the Info, HTML and Postscript versions of the user manual
@@ -422,10 +425,12 @@ $(man_dir)/hyperbole.html: $(TEXINFO_SRC) $(man_dir)/hyperbole.css $(man_dir)/te
422425
#
423426
# `pandoc' is available from:
424427
# https://github.com/jgm/pandoc
425-
README.md.html: README.md README.toc.md
428+
README.toc.md: README.md
426429
cp -p README.md README.toc.md && md_toc -p -m [TOC] github README.toc.md \
427-
&& sed -i -e 's/^\[TOC\]//g' README.toc.md \
428-
&& pandoc --from=gfm-tex_math_dollars --to=html+gfm_auto_identifiers -o README.md.html README.toc.md
430+
&& sed -i -e 's/^\[TOC\]//g' README.toc.md
431+
432+
README.md.html: README.toc.md
433+
pandoc --from=gfm-tex_math_dollars --to=html+gfm_auto_identifiers -o README.md.html README.toc.md
429434

430435
# website maintenance: "https://www.gnu.org/software/hyperbole/"
431436
define confirm

0 commit comments

Comments
 (0)