forked from onnx/onnx-mlir
-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (92 loc) · 4.34 KB
/
doxygen-docs-publish.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: GitHub Action Doxygen docs
on:
push:
branches: [ main ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout onnx-mlir source
uses: actions/checkout@v2
with:
path: onnx-mlir
- name: checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- name: install doxygen and rsync
run: |
sudo apt-get update
sudo apt-get install -y doxygen rsync
- name: copy docs into gh-pages
run: |
# Delete everything in gh-pages that are not in docs but keep .git*
rsync -ahvP --delete --filter 'protect .git*' \
$GITHUB_WORKSPACE/onnx-mlir/docs/ $GITHUB_WORKSPACE/gh-pages/
- name: doxygen API html
run: |
mkdir -p $GITHUB_WORKSPACE/gh-pages/doxygen_html
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/include/OnnxMlirRuntime.h; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OnnxMlirRuntime) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OnnxMlirRuntime \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/src/Runtime/jni/src/com/ibm/onnxmlir/OMModel.java; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OMModel_java) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OMModel_java \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/include/onnx-mlir/Runtime/OMTensor.h; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensor_h) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensor_h \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/include/onnx-mlir/Runtime/OMTensorList.h; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensorList_h) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensorList_h \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/src/Runtime/jni/src/com/ibm/onnxmlir/OMTensor.java; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensor_java) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensor_java \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
(cat $GITHUB_WORKSPACE/onnx-mlir/Doxyfile; \
echo INPUT=$GITHUB_WORKSPACE/onnx-mlir/src/Runtime/jni/src/com/ibm/onnxmlir/OMTensorList.java; \
echo HTML_OUTPUT=$GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensorList_java) | \
doxygen -
# Add Jekyll front matter to pass the html through Jekyll processing
for html in $(find $GITHUB_WORKSPACE/gh-pages/doxygen_html/OMTensorList_java \
-name "*.html"); do \
sed -i -e '1s/^/---\nlayout: default\n---\n/' $html; \
done
- name: commit updated gh-pages
run: |
cd $GITHUB_WORKSPACE/gh-pages
git config user.email "onnxmlir@onnx.ai"
git config user.name "Doxygen Bot (GitHub Action)"
git add .
# Don't fail if the branch is already up-to-date
git commit -m "Push docs and doxygen updates into gh-pages branch" || true
git push