docs: select-entity API definitions #184
Workflow file for this run
This file contains hidden or 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
| name: AsyncAPI | |
| on: | |
| push: | |
| paths: | |
| - 'dock-api/**' | |
| - 'core-api/websocket/**' | |
| - 'integration-api/**' | |
| - '.github/workflows/asyncapi.yml' | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| paths: | |
| - 'dock-api/**' | |
| - 'core-api/websocket/**' | |
| - 'integration-api/**' | |
| - '.github/workflows/asyncapi.yml' | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| validate: | |
| name: Validate AsyncAPI | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # To push a branch | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Validate websocket-api | |
| uses: WaleedAshraf/asyncapi-github-action@v0.0.10 | |
| with: | |
| filepath: './core-api/websocket/UCR-core-asyncapi.yaml' | |
| - name: Validate integration-api | |
| uses: WaleedAshraf/asyncapi-github-action@v0.0.10 | |
| with: | |
| filepath: './integration-api/UCR-integration-asyncapi.yaml' | |
| - name: Validate dock-api | |
| uses: WaleedAshraf/asyncapi-github-action@v0.0.10 | |
| with: | |
| filepath: './dock-api/UCD2-asyncapi.yaml' | |
| - name: Prepare AsyncAPI html output | |
| run: | | |
| mkdir -p ./static/api/ws ./static/api/integration ./static/api/dock | |
| - name: Install AsyncAPI generator | |
| run: | | |
| if [[ ! -x "$(command -v ag)" ]]; then | |
| echo "AsyncAPI generator (ag) not found, installing it with npm" | |
| sudo npm install -g @asyncapi/html-template@0.28.4 | |
| sudo npm install -g @asyncapi/generator@1.10.14 | |
| fi; | |
| ag --version | |
| - name: Generate core AsyncAPI HTML doc | |
| run: | | |
| ag ./core-api/websocket/UCR-core-asyncapi.yaml @asyncapi/html-template -o ./static/api/ws --force-write | |
| - name: Generate integration AsyncAPI HTML doc | |
| run: | | |
| ag ./integration-api/UCR-integration-asyncapi.yaml @asyncapi/html-template -o ./static/api/integration --force-write | |
| cp ./integration-api/*.proto ./static/api/integration/ | |
| - name: Generate dock AsyncAPI HTML doc | |
| run: | | |
| ag ./dock-api/UCD2-asyncapi.yaml @asyncapi/html-template -o ./static/api/dock --force-write | |
| - name: Deploy core API GH page | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: ./static/api/ws | |
| target-folder: ./ws | |
| - name: Deploy integration API GH page | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: ./static/api/integration | |
| target-folder: ./integration | |
| - name: Deploy dock API GH page | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: ./static/api/dock | |
| target-folder: ./dock |