A GitHub Action that generates markdown documentation from Go source code.
Find a file
2023-02-03 12:54:39 +01:00
.idea initial commit 2023-02-03 11:49:00 +01:00
action.yaml great 2023-02-03 12:49:18 +01:00
readme.md better readme 2023-02-03 12:54:39 +01:00

gomarkdoc

A GitHub Action that generates markdown documentation from Go source code.

Inputs

output-file

Required The output file to write the documentation to. Default: DOC.md

Usage

The action is designed to run as part of your GitHub Actions workflow. An example workflow that generates documentation and commits it to the repository is as follows:

yamlCopy code

name: Generate documentation

on:
  push:
    branches:
      - main

permissions:
  contents: write

jobs:
  generate-docs:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Generate documentation
        uses: Sett17/gomarkdoc-action@latest
        with:
          output-file: DOC.md

      - name: Commit documentation
        uses: EndBug/add-and-commit@v9
        with:
          commit: --signoff
          default_author: github_actor
          message: 'Update docs'