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
{{ message }}
This repository was archived by the owner on Feb 12, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-30Lines changed: 15 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ This action generates whatever you want using your AsyncAPI document. It uses [A
6
6
7
7
### `template`
8
8
9
-
Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.
9
+
Template for the generator. Official templates are listed here https://github.com/asyncapi/generator#list-of-official-generator-templates. You can pass template as npm package, url to git repository, link to tar file or local template.
10
10
11
-
**Default** points to `@asyncapi/markdown-template@0.3.0` template.
11
+
**Default** points to `@asyncapi/markdown-template@0.10.0` template.
12
12
13
13
> We recommend to always specify the version of the template to not encounter any issues with the action in case of release of the template that is not compatible with given version of the generator.
14
14
@@ -28,55 +28,36 @@ Directory where to put the generated files.
28
28
29
29
**Default** points to `output` directory in the working directory.
30
30
31
-
## Outputs
32
-
33
-
### `files`
34
-
35
-
List of generated files.
36
-
37
31
## Example usage
38
32
39
33
### Basic
40
34
41
35
In case all defaults are fine for you, just add such step:
42
36
43
-
```
37
+
```yaml
44
38
- name: Generating Markdown from my AsyncAPI document
45
-
uses: asyncapi/github-action-for-generator@v0.2.0
39
+
uses: asyncapi/github-action-for-generator@v1
46
40
```
47
41
48
42
### Using all possible inputs
49
43
50
44
In case you do not want to use defaults, you for example want to use different template:
51
45
52
-
```
46
+
```yaml
53
47
- name: Generating HTML from my AsyncAPI document
54
-
uses: asyncapi/github-action-for-generator@v0.2.0
48
+
uses: asyncapi/github-action-for-generator@v1
55
49
with:
56
-
template: '@asyncapi/html-template@0.3.0' #In case of template from npm, because of @ it must be in quotes
50
+
template: '@asyncapi/html-template@0.15.4'#In case of template from npm, because of @ it must be in quotes
57
51
filepath: docs/api/my-asyncapi.yml
58
52
parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values
59
53
output: generated-html
60
54
```
61
55
62
-
### Accessing output of generation step
63
-
64
-
In case you want to have more steps in your workflow after generation and you need to know what files were exactly generated, you can access this information as shown below:
65
-
66
-
```
67
-
- name: Generating Markdown from my AsyncAPI document
- name: Another step where I want to know what files were generated so I can pass it to another step and process them forward if needed
71
-
run: echo '${{steps.generation.outputs.files}}'
72
-
```
73
-
74
56
### Example workflow with publishing generated HTML to GitHub Pages
75
57
76
58
In case you want to validate your asyncapi file first, and also send generated HTML to GitHub Pages this is how full workflow could look like:
77
59
78
-
```
79
-
60
+
```yaml
80
61
name: AsyncAPI documents processing
81
62
82
63
on:
@@ -93,15 +74,15 @@ jobs:
93
74
94
75
#Using another action for AsyncAPI for validation
95
76
- name: Validating AsyncAPI document
96
-
uses: WaleedAshraf/asyncapi-github-action@v0.0.3
77
+
uses: WaleedAshraf/asyncapi-github-action@v1
97
78
with:
98
79
filepath: docs/api/my-asyncapi.yml
99
80
100
81
#In case you do not want to use defaults, you for example want to use different template
101
82
- name: Generating HTML from my AsyncAPI document
102
-
uses: asyncapi/github-action-for-generator@v0.2.0
83
+
uses: asyncapi/github-action-for-generator@v1
103
84
with:
104
-
template: '@asyncapi/html-template@0.3.0' #In case of template from npm, because of @ it must be in quotes
85
+
template: '@asyncapi/html-template@0.9.0'#In case of template from npm, because of @ it must be in quotes
105
86
filepath: docs/api/my-asyncapi.yml
106
87
parameters: baseHref=/test-experiment/ sidebarOrganization=byTags #space separated list of key/values
107
88
output: generated-html
@@ -114,3 +95,7 @@ jobs:
114
95
BRANCH: gh-pages
115
96
FOLDER: generated-html
116
97
```
98
+
99
+
## Troubleshooting
100
+
101
+
You can enable more log information in GitHub Action by adding `ACTIONS_STEP_DEBUG` secret to repository where you want to use this action. Set the value of this secret to `true` and you''ll notice more debug logs from this action.
Copy file name to clipboardExpand all lines: action.yml
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ description: 'Use this action to generate docs or code from your AsyncAPI docume
3
3
inputs:
4
4
template:
5
5
description: 'Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.'
6
-
default: '@asyncapi/markdown-template'
6
+
default: '@asyncapi/markdown-template@0.10.0'
7
7
required: false
8
8
filepath:
9
9
description: 'Location of the AsyncAPI document.'
@@ -16,9 +16,6 @@ inputs:
16
16
description: 'Directory where to put the generated files.'
0 commit comments