-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (51 loc) · 1.73 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
name: Build Doxygen Documentation
on:
workflow_call:
jobs:
changes:
name: Check changes to source code and documentation
runs-on: 'ubuntu-20.04'
# Declare outputs for next jobs
outputs:
src_changed: ${{ steps.check_file_changed.outputs.src_changed }}
steps:
- uses: actions/checkout@v2
with:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- shell: pwsh # the example this is adopted from makes use of PowerShell
id: check_file_changed
run: |
# diff HEAD W/ previous commit
$diff = git diff --name-only HEAD^ HEAD
# check if specific folder with file extentions has changes
$SourceDiff = $diff | Where-Object { $_ -match '^modules/' -or $_ -match '^include/' -or $_ -match '^docs/' }
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "::set-output name=src_changed::$HasDiff"
deploy:
needs: [ changes ]
if: needs.changes.outputs.src_changed == 'True'
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: initalize github repo
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: LCOV_FILES
path: docs/
- name: Dependencies
run: |
sudo apt install gcovr lcov cppcheck tree doxygen
- name: Copy HTML Static Analysis and Unit Test Coverage
run: |
cp -r docs/analysis/ docs/doxygen/html/
cp -r docs/testing/ docs/doxygen/html/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/doxygen/html