From 5c5d893c5a63042949193ed3247dabb3b004975e Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 8 Jun 2026 10:46:53 -0400 Subject: [PATCH] ci(html-docs): add automatically generated html docs --- .gitea/workflows/html-docs.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/html-docs.yml diff --git a/.gitea/workflows/html-docs.yml b/.gitea/workflows/html-docs.yml new file mode 100644 index 0000000..99d4073 --- /dev/null +++ b/.gitea/workflows/html-docs.yml @@ -0,0 +1,35 @@ +name: Generate HTML docs + +on: + push: + branches: + - main + paths: + - "docs/fish-config.md" + +jobs: + build-html-docs: + runs-on: preferred + 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: Generate chunked HTML docs + run: | + pandoc -f gfm -t chunkedhtml --split-level=1 --toc -V toc=true \ + 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