You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
117
-
118
-
```yaml
119
-
- name: Generate Enhanced Documentation
120
-
uses: hoverkraft-tech/ci-dokumentor@v1
121
-
with:
122
-
source: 'action.yml'
123
-
output: 'docs/README.md'
124
-
repository: 'github'
125
-
cicd: 'github-actions'
126
-
include-sections: 'inputs,outputs,runs'
127
-
exclude-sections: 'examples'
128
-
format-link: 'full'
129
-
```
130
-
131
-
### Dry-run Example
132
-
133
-
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.
134
-
135
-
```yaml
136
-
- name: Generate Documentation (dry-run)
137
-
uses: hoverkraft-tech/ci-dokumentor@v1
138
-
with:
139
-
source: 'action.yml'
140
-
dry-run: 'true'
141
-
```
142
-
143
-
### URL Link Formatting Examples
144
-
145
-
Control how bare URLs in your documentation are formatted:
146
-
147
-
```yaml
148
-
# Transform URLs to autolinks (default when option used)
149
-
- name: Generate with Autolinks
150
-
uses: hoverkraft-tech/ci-dokumentor@v1
151
-
with:
152
-
source: 'action.yml'
153
-
format-link: 'auto'
154
-
# URLs like https://example.com become <https://example.com>
155
-
156
-
# Transform URLs to full markdown links
157
-
- name: Generate with Full Links
158
-
uses: hoverkraft-tech/ci-dokumentor@v1
159
-
with:
160
-
source: 'action.yml'
161
-
format-link: 'full'
162
-
# URLs like https://example.com become [https://example.com](https://example.com)
163
-
164
-
# Disable URL transformation
165
-
- name: Generate with Raw URLs
166
-
uses: hoverkraft-tech/ci-dokumentor@v1
167
-
with:
168
-
source: 'action.yml'
169
-
format-link: 'false'
170
-
# URLs remain as bare text: https://example.com
171
-
```
172
-
173
-
## Complete Workflow Examples
174
-
175
-
### Auto-Commit Documentation
176
-
177
-
This workflow automatically generates and commits documentation when CI/CD files change:
178
-
179
-
```yaml title=".github/workflows/auto-docs.yml"
180
-
name: Auto-Generate Documentation
181
-
182
-
on:
183
-
push:
184
-
branches: [main]
185
-
paths:
186
-
- 'action.yml'
187
-
- '.github/workflows/*.yml'
188
-
189
-
permissions:
190
-
contents: write
191
-
192
-
jobs:
193
-
generate-docs:
194
-
runs-on: ubuntu-latest
195
-
steps:
196
-
- name: Checkout
197
-
uses: actions/checkout@v4
198
-
with:
199
-
token: ${{ secrets.GITHUB_TOKEN }}
200
-
201
-
- name: Generate Documentation
202
-
uses: hoverkraft-tech/ci-dokumentor@v1
203
-
with:
204
-
source: 'action.yml'
205
-
206
-
- name: Check for Documentation Changes
207
-
id: verify-changed-files
208
-
run: |
209
-
if [ -n "$(git status --porcelain README.md)" ]; then
0 commit comments