-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (69 loc) · 2.32 KB
/
docs.yaml
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
name: Documentation
on: [push, pull_request]
env:
DOXYGEN_VERSION: 1.9.8
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Doxygen
run: |
sudo apt-mark hold grub-efi-amd64-signed
sudo apt update
sudo apt upgrade
sudo apt install graphviz qtbase5-dev qtbase5-doc-dev qtconnectivity5-dev qtconnectivity5-doc-html qttools5-dev qttools5-dev-tools
curl --location --silent "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" |
tar --extract --gzip --directory "$RUNNER_TEMP"
"$RUNNER_TEMP/doxygen-${DOXYGEN_VERSION}/bin/doxygen" --version
- name: Build docs
run: |
cmake -D "DOXYGEN_EXECUTABLE=$RUNNER_TEMP/doxygen-${DOXYGEN_VERSION}/bin/doxygen" -D "QT_TAGFILES_PATH=/usr/share/qt5/doc" -S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP"
cmake --build "$RUNNER_TEMP" --target doc doc-internal
- name: Upload public docs
uses: actions/upload-artifact@v3
with:
name: public-docs
path: "${{ runner.temp }}/doc/public"
if-no-files-found: error
- name: Upload internal docs
uses: actions/upload-artifact@v3
with:
name: internal-docs
path: "${{ runner.temp }}/doc/internal"
if-no-files-found: error
publish:
runs-on: ubuntu-latest
if: success() && (github.ref == 'refs/heads/main')
needs: generate
steps:
- uses: actions/checkout@v4
with: { ref: doc }
- name: Clear previous docs
run: rm -rf main/{doc,int}
- name: Download public docs
uses: actions/download-artifact@v3
with:
name: public-docs
path: main/doc
- name: Download internal docs
uses: actions/download-artifact@v3
with:
name: internal-docs
path: main/int
- name: Inspect changes # for diagnostics only.
run: |
git status
git diff
- name: Push updates
run: |
[[ -z $(git status --porcelain) ]] || {
git config user.name github-actions
git config user.email [email protected]
git pull
git add .
git commit -m "Update generated docs for ${GITHUB_SHA}"
git push
}