Closed perdue closed 1 year ago
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@perdue
I had the same issue and were able to solve it by using the @asyncapi/generator
directly like this:
name: Publish Docs
on:
push:
branches:
- develop
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Generating HTML from AsyncAPI file
run: |
npx @asyncapi/generator docs.yml @asyncapi/html-template -o docs-html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.4.2
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs-html
@ferdinandfrank
Thanks for the tip! I also started using the generator directly in a shell script.
It just bugs me (pun intended?) that the getting started documentation results in an error. I spent so much time trying to figure out what I had done wrong.
@perdue
Great! I also didn't get it to work with the getting started documentation and didn't find the reason for it. It would be great if the maintainers could take a look at it.
Hey folks, sorry for not responding for so long. I just opened a PR that fixes the issue https://github.com/asyncapi/github-action-for-generator/pull/300
if you want to go npx @asyncapi/generator
direction I strongly recommend to using it like npx @asyncapi/generator@1.9.17
or even @asyncapi/generator@e8002b414c176baf6ef21d98a7513acb91841943` to use specific version as we plan to remove Generator CLI as 98% of functionality is already in AsyncAPI CLI. So if you will not lock yourself to specific generator version, your pipelines will start failing at some point of time
best to use AsyncAPI CLI as we also plan to use it in https://github.com/asyncapi/github-action-for-generator/issues/281
just tested latest docker docker://asyncapi/github-action-for-generator:2.1.12
in my private repo and worked like a charm
Describe the bug
A clear and concise description of what the bug is:
ts-node
throws error when followinggithub-action-for-generator
documentation and copy-pasted the workflow file for a hello world example.How to Reproduce
Steps to reproduce the issue. Attach all resources that can help us understand the issue:
Here is a hello world repo that exhibits the error: https://github.com/perdue/asyncapi-test
docs/api/my-asyncapi.yml:
.github/workflows/generate.yml:
Expected behavior
A clear and concise description of what you expected to happen:
I expected the generator to produce the correct output considering I was following the README.