Skip to content

Commit fe8814e

Browse files
docs: update action documentation
[skip ci] Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2cfa348 commit fe8814e

1 file changed

Lines changed: 2 additions & 124 deletions

File tree

packages/docs/content/integrations/github-action.md

Lines changed: 2 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CI Dokumentor can be used directly as a GitHub Action in your workflows, making
1111
## Usage
1212

1313
```yaml
14-
- uses: hoverkraft-tech/ci-dokumentor@15c7f84ea2d28aec8be9582763d88f6a3945f1c6 # main
14+
- uses: hoverkraft-tech/ci-dokumentor@2cfa34821d58c4814fe8056a4a001fbcd2c21be2 # main
1515
with:
1616
# Source manifest file path to handle (e.g. `action.yml`, `.github/workflows/ci.yml`).
1717
# This input is required.
@@ -100,126 +100,4 @@ CI Dokumentor can be used directly as a GitHub Action in your workflows, making
100100
- [Developers Guide](../developers/ci-cd.md) - Advanced CI/CD integration patterns
101101

102102
<!-- secrets:start -->
103-
<!-- secrets:end --><!-- examples:start -->
104-
105-
### Generate Documentation for Workflows
106-
107-
```yaml
108-
- name: Generate Workflow Documentation
109-
uses: hoverkraft-tech/ci-dokumentor@v1
110-
with:
111-
source: '.github/workflows/ci.yml'
112-
```
113-
114-
### Advanced Usage with All Options
115-
116-
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
210-
echo "changed=true" >> $GITHUB_OUTPUT
211-
else
212-
echo "changed=false" >> $GITHUB_OUTPUT
213-
fi
214-
215-
- name: Commit Documentation Updates
216-
if: steps.verify-changed-files.outputs.changed == 'true'
217-
run: |
218-
git config --local user.email "action@github.com"
219-
git config --local user.name "GitHub Action"
220-
git add README.md
221-
git commit -m "docs: update action documentation\n[skip ci]"
222-
git push
223-
```
224-
225-
<!-- examples:end -->
103+
<!-- secrets:end -->

0 commit comments

Comments
 (0)