Skip to content

Commit

Permalink
Add github workflow to update latest API docs.
Browse files Browse the repository at this point in the history
Automatically updates API docs in wiki on push.
  • Loading branch information
MirahImage committed Mar 22, 2021
1 parent d7848a6 commit d06a113
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-latest-api-ref.yml
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 "github-actions@github.com"
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()

0 comments on commit d06a113

Please sign in to comment.