Skip to content

Workflow file for this run

on:
push:
paths:
- docs/**
pull_request:
workflow_dispatch:
jobs:
build-api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir -p site/
- uses: asyncapi/[email protected]
with:
command: generate
filepath: docs/api/asyncapi.yaml
template: '@asyncapi/[email protected]'
output: site/
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-api-docs-${{ github.sha }}
path: site/
deploy-pages:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs:
- build-api-docs
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}-api-docs-${{ github.sha }}
path: site/api
- uses: actions/upload-pages-artifact@v3
with:
path: site
- id: deployment
uses: actions/deploy-pages@v4