Skip to content

Support custom documentation path in doc-style and doc-build actions #1418

Description

@thesct22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions