-
Notifications
You must be signed in to change notification settings - Fork 14
50 lines (42 loc) · 1.13 KB
/
build_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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