Skip to content

Commit 914cd26

Browse files
Merge pull request #26 from stakater/feat/docs-generation-action
workflow for docs generation
2 parents f4459fa + aeba028 commit 914cd26

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Generate API Reference
2+
3+
# Regenerates content/reference/api.md from the operator's Go types by calling
4+
# the shared reusable workflow in stakater/.github. Run manually from the
5+
# Actions tab; it opens a PR with the regenerated reference.
6+
#
7+
# Repo-specific config lives in crd-ref-docs.yaml (which types/fields to ignore).
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
operator_ref:
13+
description: "Operator git ref to generate from"
14+
required: false
15+
default: "main"
16+
17+
jobs:
18+
generate:
19+
uses: stakater/.github/.github/workflows/generate-api-reference.yaml@main
20+
with:
21+
operator_repo: https://github.com/stakater-ab/template-operator.git
22+
operator_ref: ${{ github.event.inputs.operator_ref }}
23+
api_path: api/templates.stakater.com/v1alpha1
24+
config_file: crd-ref-docs.yaml
25+
output_file: content/reference/api.md
26+
# template-operator is under the private stakater-ab org; the shared
27+
# workflow configures git auth so the plain HTTPS URL clones with the token.
28+
ENABLE_STAKATER_AB_GIT_AUTH: true
29+
secrets:
30+
PR_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
31+
STAKATER_AB_REPOS: ${{ secrets.STAKATER_AB_REPOS }}

crd-ref-docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
processor:
2+
ignoreTypes:
3+
- "(TemplateList|TemplateInstanceList|ClusterTemplateInstanceList)$"
4+
ignoreFields:
5+
- "TypeMeta$"
6+
7+
render:
8+
kubernetesVersion: "1.30"

0 commit comments

Comments
 (0)