-
Notifications
You must be signed in to change notification settings - Fork 92
77 lines (62 loc) · 1.63 KB
/
kafka_api_gen_doc.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: "[Kafka API] Generate Documents"
on:
pull_request:
push:
branches:
- main
permissions:
contents: write
jobs:
kafka-api-build-doc:
runs-on: ubuntu-22.04
env:
BUILD_SUB_DIR: build/sub-build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: |
mkdir -p $BUILD_SUB_DIR
cd $BUILD_SUB_DIR
# 1. Install python3-pip
sudo apt install -y python3-pip
pip3 install markdown
# 2. Install doxygen
sudo apt install -y doxygen
- name: Config
run: |
cd $BUILD_SUB_DIR
cmake ../.. -DBUILD_OPTION_DOC_ONLY=ON
- name: Build
run: |
cd $BUILD_SUB_DIR
make VERBOSE=1
- name: Collect
run: |
mkdir document
cp $BUILD_SUB_DIR/doc/index.html document
cp -r $BUILD_SUB_DIR/doc/markdown document
cp -r $BUILD_SUB_DIR/doc/doxygen document
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: document
path: document
kafka-api-deploy-doc:
needs: [kafka-api-build-doc]
if: github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Download Artifacts
uses: actions/download-artifact@v1
with:
name: document
- name: Deploy to Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: document