Action docs
This cli let you generate, and update document for GitHub actions based on the action definition yml.
TL;DR
npm install -g action-docs
cd <your github action>
action-docs
action-ducs --update-readme
CLI
Options
The following options are available via the CLI
Options:
--help Show help [boolean]
--version Show version number [boolean]
-t, --toc-level TOC level used for markdown
[number] [required] [default: 2]
-a, --action GitHub action file [string] [default: "action.yml"]
--no-banner Print no banner
-u, --update-readme Update readme file. [string]
Examples
Print action markdown docs to console
action-docs
Update README.md
action-docs --update-readme
Print action markdown for non default action file
action-docs --action ./action.yaml
Update readme, custom action file and set TOC level 3, custom readme
action-docs --action ./some-dir/action.yml --toc-level 3 --update-readme docs.md
API
import { generateActionMarkdownDocs } from 'action-docs'
await generateActionMarkdownDocs({
actionFile: 'action.yml'
tocLevel: 2
updateReadme: true
readmeFile: 'README.md'
});