-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (117 loc) · 3.58 KB
/
dox.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: API documentation
on:
release:
types: [published]
push:
paths:
- 'src/**'
- 'include/**'
- 'css/**'
- 'resources/**'
- 'Doxyfile'
- '*.md'
- '.github/workflows/dox.yml'
pull_request:
paths:
- 'src/**'
- 'include/**'
- 'css/**'
- 'resources/**'
- 'Doxyfile'
- '*.md'
- '.github/workflows/dox.yml'
jobs:
apidocs:
name: Generate API documentation
runs-on: ubuntu-latest
env:
CC: gcc
XCHANGE: xchange
REDISX: redisx
steps:
- name: install doxygen
run: sudo apt-get install doxygen
- name: Check out smax-clib
uses: actions/checkout@v4
- name: Generate docs
run: make local-dox
site-update:
name: Update github pages
needs: apidocs
if: github.repository_owner == 'Smithsonian' && (github.event_name == 'release' || contains(github.event.head_commit.message, 'site update'))
runs-on: ubuntu-latest
steps:
- name: install doxygen
run: sudo apt-get install doxygen
- name: Checkout smax-clib
uses: actions/checkout@v4
with:
repository: Smithsonian/smax-clib
path: smax-clib
- name: Check out xchange dependency
uses: actions/checkout@v4
with:
repository: Smithsonian/xchange
path: xchange
- name: Check out RedisX dependency
uses: actions/checkout@v4
with:
repository: Smithsonian/redisx
path: redisx
- name: Generate docs
run: make -C xchange local-dox
- name: Generate docs
run: make -C redisx local-dox
- name: Generate headless README for smax-clib
run: make -C smax-clib README-smax.md
- name: Generate smax-clib apidocs
uses: mattnotmitt/[email protected]
with:
additional-packages: font-roboto
working-directory: ./smax-clib
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: site
- name: Assert site/doc/
run: mkdir -p site/doc
- name: Copy README
run: |
echo '<img src="/smax-clib/resources/CfA-logo.png" alt="CfA logo" width="400" height="67" align="right">' > site/doc/README.md
echo '<br clear="all">' >> site/doc/README.md
cat smax-clib/README-smax.md >> site/doc/README.md
- name: Copy CHANGELOG
run: cp smax-clib/CHANGELOG.md site/doc/
- name: Copy API documentation
run: cp -a smax-clib/apidoc site/
- name: Push to pages
run: |
cd site
git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions"
git add -A
git commit -m "[automated site update]" && git push || true
changelog-update:
name: Update CHANGELOG on github pages
if: github.repository_owner == 'Smithsonian' && contains(github.event.head_commit.message, 'changelog update')
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: site
- name: Assert site/doc/
run: mkdir -p site/doc
- name: Copy CHANGELOG
run: cp CHANGELOG.md site/doc/
- name: Push to pages
run: |
cd site
git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions"
git add -A
git commit -m "[automated site update]" && git push || true