Start an mdBook under docs/, laid out as in coreutils, and move the list of extensions and incompatibilities out of the README into it. The README keeps a pointer. A Documentation workflow builds the book with mdbook 0.5.0, the version the uutils website uses, whenever docs/ changes, and uploads it as an artifact. mdbook 0.5 rejects the `multilingual` field coreutils still carries (the website strips it before building), so the book leaves it out.
42 lines
802 B
YAML
42 lines
802 B
YAML
name: Documentation
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'docs/**'
|
|
- '.github/workflows/documentation.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**'
|
|
- '.github/workflows/documentation.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-doc:
|
|
name: Build the mdBook documentation
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install mdbook
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: mdbook@0.5.0
|
|
|
|
- name: Build documentation
|
|
run: mdbook build docs
|
|
|
|
- name: Upload documentation
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: documentation
|
|
path: docs/book
|