Files
fish-config/.gitea/workflows/build-docs.yml
T
rootiest 21437d1881
Generate documentation / build-docs (push) Successful in 32s
Offline docs drift reminder / remind (push) Successful in 10s
feat(docs): add auto-generated Markdown wiki
Adds docs/split-wiki.py, a Python script that splits fish-config.md
into a multi-page Markdown wiki under docs/wiki/:

- index.md: DESCRIPTION intro + full section ToC
- one file per numbered section (1-configuration-variables.md … 9-viewing-this-manual.md)
- each section page has a nav bar at the top linking to every other section

The build-docs.yml workflow now runs the script alongside pandoc so all
three formats (man page, HTML, wiki) are regenerated together from a
single source in one CI run.

README slimmed down to a pointer to the wiki; docs/fish-config.md §9
gains an "As a wiki" subsection.
2026-06-08 16:27:35 -04:00

49 lines
1.3 KiB
YAML

name: Generate documentation
on:
push:
branches:
- main
paths:
- "docs/fish-config.md"
jobs:
build-docs:
runs-on: racknerd-mini
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Install pandoc
run: sudo apt-get update -qq && sudo apt-get install -y pandoc
- name: Compile man page
run: |
pandoc --standalone \
--from markdown \
--to man \
docs/fish-config.md \
-o docs/fish-config.1
- name: Generate chunked HTML docs
run: |
rm -rf docs/html/
pandoc -f gfm -t chunkedhtml --split-level=1 --toc \
--include-in-header docs/html-style.html \
docs/fish-config.md \
-o docs/html/
- name: Generate wiki markdown
run: python3 docs/split-wiki.py
- name: Commit generated docs
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea"
git add docs/fish-config.1 docs/html/ docs/wiki/
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore(docs): regenerate man page, HTML docs, and wiki"
git push