Description
The doc-style and doc-build actions currently hardcode doc/ at the repository root in multiple places, making them incompatible with projects that have documentation in a subdirectory (e.g., blueprint/doc/, src/doc/).
doc-style
While vale-config and files inputs are configurable, the vocabulary directory validation step hardcodes ./doc/styles/config/vocabularies:
if [ ! -d ./doc/styles/config/vocabularies ]; then
echo "Projects using Vale >=v3 require a doc/styles/config/vocabularies directory."
exit 1
fi
Proposed fix
Use the files input (or a new doc-path input) to resolve the vocabulary directory path instead of hardcoding ./doc/styles/....
doc-build / _doc-build-linux
Multiple hardcoded doc/ references in _doc-build-linux/action.yml:
make -C doc html / make -C doc pdf / make -C doc linkcheck
EXPECTED_BUILD_DIR=doc/_build
path: doc/_build/html (artifact upload)
path: doc/_build/latex/*.pdf (artifact upload)
Same issue in _doc-build-windows/action.yml with cd doc.
Proposed fix
Add a doc-path input (default: doc) and use it in place of all hardcoded doc/ references.
Current workaround
Projects with non-standard doc paths must create a symlink before calling the actions:
- run: ln -s blueprint/doc doc
- uses: ansys/actions/doc-style@v10
with:
checkout: false
vale-config: doc/.vale.ini
files: doc/source
This works but is fragile and non-obvious.
Description
The
doc-styleanddoc-buildactions currently hardcodedoc/at the repository root in multiple places, making them incompatible with projects that have documentation in a subdirectory (e.g.,blueprint/doc/,src/doc/).doc-style
While
vale-configandfilesinputs are configurable, the vocabulary directory validation step hardcodes./doc/styles/config/vocabularies:Proposed fix
Use the
filesinput (or a newdoc-pathinput) to resolve the vocabulary directory path instead of hardcoding./doc/styles/....doc-build / _doc-build-linux
Multiple hardcoded
doc/references in_doc-build-linux/action.yml:make -C doc html/make -C doc pdf/make -C doc linkcheckEXPECTED_BUILD_DIR=doc/_buildpath: doc/_build/html(artifact upload)path: doc/_build/latex/*.pdf(artifact upload)Same issue in
_doc-build-windows/action.ymlwithcd doc.Proposed fix
Add a
doc-pathinput (default:doc) and use it in place of all hardcodeddoc/references.Current workaround
Projects with non-standard doc paths must create a symlink before calling the actions:
This works but is fragile and non-obvious.