File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -697,11 +697,25 @@ jobs:
697697 # mrdocs documenting mrdocs demo
698698 mrdocs --config="$(pwd)/docs/mrdocs.yml" "$(pwd)/CMakeLists.txt" --output="$(pwd)/demos/mrdocs/$variant/$generator" --multipage=$multipage --generator="$generator" --log-level=debug
699699 done
700+
700701 # Render the asciidoc files to html using asciidoctor
701702 if [[ ${{ runner.os }} == 'Linux' ]]; then
702703 for project in boost-url mrdocs; do
703- mkdir -p "$(pwd)/demos/$project/$variant/adoc-asciidoc"
704- asciidoctor -D "$(pwd)/demos/$project/$variant/adoc-asciidoc" "$(pwd)/demos/$project/$variant/adoc/*.adoc"
704+ root="$(pwd)/demos/$project/$variant"
705+ src="$root/adoc"
706+ dst="$root/adoc-asciidoc"
707+
708+ # Create the top-level output dir
709+ mkdir -p "$dst"
710+
711+ # Find every .adoc (recursively), mirror the directory structure, and render
712+ find "$src" -type f -name '*.adoc' -print0 |
713+ while IFS= read -r -d '' f; do
714+ rel="${f#"$src/"}" # path relative to $src
715+ outdir="$dst/$(dirname "$rel")" # mirror subdir inside $dst
716+ mkdir -p "$outdir"
717+ asciidoctor -D "$outdir" "$f"
718+ done
705719 done
706720 fi
707721 done
You can’t perform that action at this time.
0 commit comments