Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.27 KB

README.md

File metadata and controls

45 lines (35 loc) · 1.27 KB

ansdoc action

Github Action running ansdoc

Usage

name: ansdoc

on:
  # run this action only on master/main branch, so the README.md gets updated
  # after every successful merge from a feature branch
  push:
    branches:
      - 'main'
      - 'master'

jobs:
  ansdoc:
    name: ansdoc

    # required to commit the specified output file back to the branch
    permissions:
      contents: write

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - uses: FalcoSuessgott/ansdoc-action@v1
        with:
            # file containting the ansible variables (default: defaults/main.yml)
            # the file needs to contain two "<!--ansdoc -->" seperators!
            vars-file: defaults/main.yml
            # specifiy the output file (default: README.md)
            output-file:  README.md

        # this step commits the output-file back to the repo. Check: https://github.com/stefanzweifel/git-auto-commit-action
      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: "docs(vars): update documentation generated by ansdoc"

Notable Projects that use this action: