forked from nRF24/RF24Network
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (76 loc) · 2.68 KB
/
doxygen.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
name: build Docs
on:
pull_request:
types: [opened, reopened]
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
push:
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
release:
branches: [master]
types: [published, edited]
workflow_dispatch:
jobs:
build-doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get latest release version number
id: latest_ver
run: echo "::set-output name=release::$(awk -F "=" '/version/ {print $2}' library.properties)"
- name: overwrite doxygen tags
run: |
touch doxygenAction
echo "PROJECT_NUMBER = ${{ steps.latest_ver.outputs.release }}" >> doxygenAction
echo "@INCLUDE = doxygenAction" >> Doxyfile
- name: install Doxygen static libclang deps
run: sudo apt-get install libclang1-9 libclang-cpp9
- name: install doxygen from SF binary archives
env:
DOXYGEN_VERSION: '1.9.4'
run: |
mkdir doxygen && cd doxygen
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz
gunzip doxygen.tar.gz
tar xf doxygen.tar
cd doxygen-$DOXYGEN_VERSION
sudo make install
- run: doxygen
- name: Save doxygen docs as artifact
uses: actions/upload-artifact@v2
with:
name: "RF24Network_doxygen_docs"
path: ${{ github.workspace }}/docs/html
- name: upload to github pages
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
# build pretty docs using doxygen XML output with Sphinx
- uses: actions/setup-python@v2
- name: Install sphinx deps
run: python -m pip install -r docs/sphinx/requirements.txt
- name: build docs with Sphinx
working-directory: docs
run: sphinx-build sphinx _build
- name: Save sphinx docs as artifact
uses: actions/upload-artifact@v2
with:
name: "RF24Network_sphinx_docs"
path: ${{ github.workspace }}/docs/_build