-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autogenerate API Reference Documentation (#546)
This PR allows auto generation of the API Reference documentation from the api/ directory in the repo. Running make api-reference, or any other make target that requires auto generation of code, will cause the reference docs to be regenerated. They now live at docs/api/rabbitmq.com.ref.asciidoc. This format can be interpreted by GitHub and rendered as HTML. Allowing this documentation to be autogenerated will prevent API elements/descriptions being updated without the API reference docs being updated alongside. This PR also includes a GitHub Action to take the generated Asciidoc and insert it into our GitHub Wiki, so that our API reference is neatly packaged together with the source code.
- Loading branch information
Showing
13 changed files
with
723 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Update API Reference Wiki page" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
update-api-reference: | ||
name: Update API Reference Wiki | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout operator codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
path: cluster-operator | ||
- name: Checkout wiki codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }}.wiki | ||
path: wiki | ||
- name: Push to wiki | ||
run: | | ||
cd wiki | ||
git config --local user.email "github-actions@github.com" | ||
git config --local user.name "github-actions" | ||
cp ../cluster-operator/docs/api/rabbitmq.com.ref.asciidoc ./API_Reference.asciidoc | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Update API Reference" && git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.