first
Some checks failed
Reduce Adoc / reduce (push) Failing after 57s
Java Unit Test with Maven / test (push) Failing after 1m42s

This commit is contained in:
2025-12-29 13:59:13 +08:00
commit 2dfed7464e
555 changed files with 35895 additions and 0 deletions

42
.github/workflows/reduce-adoc.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Reduce Adoc
on:
push:
paths:
- '**/*-source.adoc'
branches: ['**']
workflow_dispatch:
permissions:
contents: write
jobs:
reduce:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install asciidoctor-reducer
run: gem install --no-document asciidoctor-reducer
- name: Reduce all *-source.adoc files
shell: bash
run: |
set -euo pipefail
mapfile -d '' -t sources < <(find . -type f -name '*-source.adoc' -print0)
for src in "${sources[@]}"; do
out="${src%-source.adoc}.adoc"
mkdir -p "$(dirname "$out")"
echo "Reducing $src -> $out"
asciidoctor-reducer --preserve-conditionals -o "$out" "$src"
done
- name: Commit reduced files
uses: EndBug/add-and-commit@v9