Skip to content

[Feature] Documentation enhancement for Github Actions #128

@jofas

Description

@jofas

Hi,

first of all, thanks for this neat project.

Yesterday, I was trying to build a Github Action for one of my projects that auto-generates a TOC for my readme. I started with your documentation on how to use github-markdown-toc with a Github Action. While the example works fine if you copy and paste it (the TOC gets generated correctly) I had to tweak it in order to remove some unwanted overhead. Namely:

  • Copy and pasting the example results in the gh-md-toc script being added to the repo by the action
  • Everytime I update foo.md the action is run and a new TOC is generated, even if it did not change visibly (because by default the footer is added). So even if I do not change the layout of my foo.md, only some content, the Github Action will still apply the auto-commit with the updated TOC.

Both, the gh-md-toc script being added and the unnecessary automatic commits by the Github Action can be easily fixed by changing the example just a little bit. Changing the example makes it better copy-and-pasteable and enhances the documentation of this project, I think.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions