-
Notifications
You must be signed in to change notification settings - Fork 69
88 lines (70 loc) · 3.56 KB
/
generate-api-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This is a basic workflow to help you get started with Actions
name: generate-api-docs
# Controls when the workflow will run
on:
workflow_dispatch:
workflow_call:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
generate-docs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout docs repo
uses: actions/checkout@v3
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Application and Environment API
uses: actions/checkout@v3
with:
path: crd-temp/application-api
repository: konflux-ci/application-api
- name: Checkout Integration Service API
uses: actions/checkout@v3
with:
path: crd-temp/integration-service
repository: konflux-ci/integration-service
- name: Checkout Release Service API
uses: actions/checkout@v3
with:
path: crd-temp/release-service
repository: konflux-ci/release-service
- name: Checkout Enterprise Contract API
uses: actions/checkout@v3
with:
path: crd-temp/enterprise-contract-controller
repository: enterprise-contract/enterprise-contract-controller
- name: Checkout Internal Services API
uses: actions/checkout@v3
with:
path: crd-temp/internal-services
repository: konflux-ci/internal-services
- name: Checkout Image Controller API
uses: actions/checkout@v3
with:
path: crd-temp/image-controller
repository: konflux-ci/image-controller
- name: Install crd-ref-docs
uses: supplypike/setup-bin@v1
with:
uri: 'https://github.com/elastic/crd-ref-docs/releases/download/v0.0.8/crd-ref-docs'
name: 'crd-ref-docs'
version: '0.0.8'
- name: Generate application and environment API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/application-environment-api.md --renderer=markdown --source-path=crd-temp/application-api/api/v1alpha1
- name: Generate Image Controller API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/image-controller.md --renderer=markdown --source-path=crd-temp/image-controller/api/v1alpha1/
- name: Generate Integration Service API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/integration-service.md --renderer=markdown --source-path=crd-temp/integration-service/api/v1alpha1/
- name: Generate Release Service API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/release-service.md --renderer=markdown --source-path=crd-temp/release-service/api/v1alpha1/
- name: Generate Enterprise Contract API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/enterprise-contract.md --renderer=markdown --source-path=crd-temp/enterprise-contract-controller/api/v1alpha1/
- name: Generate Internal Services API docs
run: crd-ref-docs --log-level=ERROR --config=ref/config.yaml --output-path=ref/internal-services.md --renderer=markdown --source-path=crd-temp/internal-services/api/v1alpha1/
- name: Upload generated docs
uses: actions/upload-artifact@v3
with:
name: api-docs
path: ref/