Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Markdown autodocs

Actions
A github action that automatically format markdown files, sync external docs/src code make better docs
v1.0.1
Star (190)

npm version MIT License

A GitHub action that uses comment blocks in markdown files to automatically sync or transform its contents. Then to commit the markdown files and push them back to the GitHub repository. By default, the commit is made in the name of "GitHub Actions" and co-authored by the user that made the last commit.

  • Automatically keep markdown files up to date from local or remote code sources
  • Create an HTML table from JSON file and add the table to markdown files.
  • Identifies all the artifacts generated from a workflow. Then add the artifacts table consisting of the artifact download and workflow-run URL in the markdown files.

The comments markdown autodocs uses are hidden in markdown and when viewed as HTML.

This README.md is generated with markdown-autodocs view the raw file to see how.

Video demo - In-ProgressExample Repo

Table of contents

Usage

Add the following step at the end of your job, after other steps that might add or change files.

uses: dineshsonachalam/markdown-autodocs@v1.0.0

The following is an extended example with all possible options available for this Action.

- uses: dineshsonachalam/markdown-autodocs@v1.0.0
  with:
    # Optional, defaults to author of the commit that triggered the run
    commit_author: Author <actions@github.com>

    # Optional, defaults to "actions@github.com"
    commit_user_email: my-github-actions-bot@example.org

    # Optional, but recommended
    # Defaults to "Apply automatic changes"
    commit_message: Apply automatic changes

    # Optional branch name where commit should be pushed to.
    # Defaults to the current branch.
    branch: feature-123

    # Optional output file paths
    # Defaults to '[./README.md]'.
    output_file_paths: '[./README.md]'

    # Categories to automatically sync or transform its contents in the markdown files.
    # Defaults to '[code-block,json-to-html-table,workflow-artifact-table]'
    categories: '[code-block,json-to-html-table,workflow-artifact-table]'

Example Workflow

Inputs

Checkout action.yml for a full list of supported inputs.

Markdown autodocs is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

A github action that automatically format markdown files, sync external docs/src code make better docs
v1.0.1

Markdown autodocs is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.