Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate documentation from actions.yml #1239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stschulte
Copy link

Description:
Right now inputs and outputs of an action are documented in actions.yml but this is not the first place a user
looks at. To have valid documentation inside README.md a section inside the README seems to be manually
maintained and kept in sync with the actions.yml file.

Since I was facing a similar issue I assume you are facing here, I developed github-actions-docs and I am wondering wether this would be helpful for you as well.

This PR now introduces github-actions-docs to automatically generate documentation of inputs and outputs.

It can be used to update documentation when running

npm run pre-checkin

NOTE: This commit seems to introduce change to the dist/ directory after running npm run pre-checkin. I am not exactly sure why this is, I assume this is partially due to a bump in tslib but I also see CRLF->LF changes which also happen for me on a clear git checkout. Let me know if you want to dig deeper into this.

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Right now the documentation of valid inputs (and outputs) seems to be
manually maintained inside the `README.md` with a reference to the
`actions.yml` file.

Since this can be rather tedious to maintain this commit now uses
[github-actions-docs][1] to automatically generate documentation.

[1]: https://www.npmjs.com/package/github-action-docs
@stschulte stschulte requested a review from a team as a code owner March 4, 2025 19:02
@stschulte
Copy link
Author

Version 1.1.0 of github-actions-docs drops the dependency on tslib. Using this to generate documentation instead of 1.0.0 (which is in this PR) no longer cause changes dist since we would not bump tslib. I am happy to rebase as long as noone is actively rereviewing this right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant