forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (45 loc) · 1.37 KB
/
publish-c-apidocs.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
name: Update C/C++ API Docs
on:
push:
branches:
- main
paths:
- include/onnxruntime/core/session
workflow_dispatch:
jobs:
publish:
name: Generate C/C++ API docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install doxygen and dependencies
run: |
sudo apt update
sudo apt-get install libclang-dev
sudo apt-get install libclang-cpp14
wget https://www.doxygen.nl/files/doxygen-1.9.6.linux.bin.tar.gz
tar xvzf doxygen-1.9.6.linux.bin.tar.gz
- name: Set commit ID
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Run doxygen
run: |
mkdir -p build/doxygen
cd docs/c_cxx
../../doxygen-1.9.6/bin/doxygen
- uses: actions/checkout@v2
with:
ref: gh-pages
clean: false
- name: Move API docs into target area
run: |
rm -rf docs/api/c
mv build/doxygen/html docs/api/c
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: gh-pages-pr-c-docs
base: gh-pages
title: '[Automated]: Update C/C++ API docs'
commit-message: 'Update C/C++ API docs to commit ${{ steps.vars.outputs.sha_short }}'
add-paths: docs/api/c