GitHub Action Integration
CI Dokumentor can be used directly as a GitHub Action in your workflows, making it easy to automatically generate and maintain documentation for your CI/CD components.
Usage
- uses: hoverkraft-tech/ci-dokumentor@fe7b78e19572b70e2a5db7f2a61b99c70358061a # 0.1.2
with:
# Source manifest file path to handle (e.g. `action.yml`, `.github/workflows/ci.yml`).
# This input is required.
source: ""
# Destination path for generated documentation (optional; destination is auto-detected if not specified by the adapter).
destination: ""
# Repository platform (auto-detected if not specified).
repository: ""
# CI/CD platform (`github-actions`, `gitlab-ci`, etc.).
cicd: ""
# Comma-separated list of sections to include.
include-sections: ""
# Comma-separated list of sections to exclude.
exclude-sections: ""
# Whether to perform a dry run (no files are written).
# Default: `false`
dry-run: "false"
# Version to document (auto-detected if not specified).
version: ""
# JSON array of extra badges to include in the documentation.
# Each badge should have `label`, `url`, and optional `linkUrl` properties.
extra-badges: ""
# Transform bare URLs to links.
# Types: `auto` (autolinks), `full` (full links), `false` (disabled).
#
# Default: `auto`
format-link: auto
# The GitHub token used to fetch repository information.
# Default: `${{ github.token }}`
github-token: ${{ github.token }}
# Version of CI Dokumentor to use. See https://github.com/hoverkraft-tech/ci-dokumentor/releases.
# Default: `latest`
ci-dokumentor-version: latest
Inputs
Input | Description | Required | Default |
---|---|---|---|
source | Source manifest file path to handle (e.g. action.yml , .github/workflows/ci.yml ). | true | - |
destination | Destination path for generated documentation (optional; destination is auto-detected if not specified by the adapter). | false | - |
repository | Repository platform (auto-detected if not specified). | false | - |
cicd | CI/CD platform (github-actions , gitlab-ci , etc.). | false | - |
include-sections | Comma-separated list of sections to include. | false | - |
exclude-sections | Comma-separated list of sections to exclude. | false | - |
dry-run | Whether to perform a dry run (no files are written). | false | false |
version | Version to document (auto-detected if not specified). | false | - |
extra-badges | JSON array of extra badges to include in the documentation. | false | - |
Each badge should have label , url , and optional linkUrl properties. | |||
format-link | Transform bare URLs to links. | false | auto |
Types: auto (autolinks), full (full links), false (disabled). | |||
github-token | The GitHub token used to fetch repository information. | false | ${{ github.token }} |
ci-dokumentor-version | Version of CI Dokumentor to use. See https://github.com/hoverkraft-tech/ci-dokumentor/releases. | false | latest |
Outputs
Output | Description |
---|---|
destination | Destination path for generated documentation. |
Examples
Generate Documentation for Workflows
- name: Generate Workflow Documentation
uses: hoverkraft-tech/ci-dokumentor@fe7b78e19572b70e2a5db7f2a61b99c70358061a # 0.1.2
with:
source: ".github/workflows/ci.yml"
Advanced Usage with All Options
The CLI accepts a single --source <file>
per invocation. To generate documentation for multiple files in a workflow, run the action multiple times or script the Docker/CLI call for each file. Example using a shell step to process multiple manifest files:
- name: Generate Enhanced Documentation
uses: hoverkraft-tech/ci-dokumentor@fe7b78e19572b70e2a5db7f2a61b99c70358061a # 0.1.2
with:
source: "action.yml"
output: "docs/README.md"
repository: "github"
cicd: "github-actions"
include-sections: "inputs,outputs,runs"
exclude-sections: "examples"
format-link: "full"
Dry-run Example
To preview changes without modifying files, set the dry-run
input to true
. The action will pass --dry-run
to the CLI and the core generator will produce a diff instead of writing files.
- name: Generate Documentation (dry-run)
uses: hoverkraft-tech/ci-dokumentor@fe7b78e19572b70e2a5db7f2a61b99c70358061a # 0.1.2
with:
source: "action.yml"
dry-run: "true"
Related Documentation
- CLI Package - Command-line interface reference
- CI/CD - GitHub Package - CI/CD GitHub package reference
- Introduction - Quick start and basic usage examples
- Developers Guide - Advanced CI/CD integration patterns