-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow to update latest API docs.
Automatically updates API docs in wiki on push.
- Loading branch information
1 parent
d7848a6
commit d06a113
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
name: "Update Latest API Reference Wiki page" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
update-api-reference: | ||
name: Update Latest API Reference Wiki | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout operator codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
path: messaging-topology-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 "[email protected]" | ||
git config --local user.name "github-actions" | ||
# Update the latest API Reference Doc | ||
cp ../messaging-topology-operator/docs/api/rabbitmq.com.ref.asciidoc ./API_Reference.asciidoc | ||
git add ./API_Reference.asciidoc | ||
git diff-index --quiet HEAD || git commit -m "Update Latest API Reference" && git push | ||
- uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,message,action,eventName | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
if: failure() |