Files
fish-config/.gitea/workflows/html-docs.yml
T
rootiest 9795164eda feat(docs): add dark-mode HTML styling and drop per-page ToC
- Add docs/html-style.html with Catppuccin Latte/Mocha palette,
  auto-selected via prefers-color-scheme
- Update html-docs workflow: embed stylesheet via --include-in-header,
  remove --toc so per-page sidebar is gone (index.html remains the ToC)
- Touch docs/fish-config.md to trigger the HTML generation workflow

fix(ci): clear docs/html/ before pandoc to avoid directory-exists error

fix(docs): restore toc on index, hide it on section pages via JS, fix
full-page bg

fix(docs): fix nav alignment by grouping label+link pairs as flex units

chore(docs): regenerate offline HTML docs
2026-06-08 11:57:04 -04:00

42 lines
1.2 KiB
YAML

name: Generate HTML docs
on:
push:
branches:
- main
paths:
- "docs/fish-config.md"
jobs:
build-html-docs:
runs-on: racknerd-mini
steps:
- name: Checkout
env:
TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
HOST="${GITHUB_SERVER_URL#*://}"
SCHEME="${GITHUB_SERVER_URL%%://*}"
git clone --depth=1 --branch "${GITHUB_REF_NAME}" \
"${SCHEME}://oauth2:${TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" .
- name: Install pandoc
run: sudo apt-get update -qq && sudo apt-get install -y pandoc
- 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: Commit HTML docs
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea"
git add docs/html/
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore(docs): regenerate offline HTML docs"
git push