-
Notifications
You must be signed in to change notification settings - Fork 92
76 lines (65 loc) · 1.8 KB
/
docs.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
name: Documentation
on:
push:
branches:
- master
paths:
- '**.nss'
- '**.md'
- 'docgen/**'
pull_request:
branches:
- master
paths:
- '**.nss'
- '**.md'
- 'docgen/**'
concurrency:
group: "docs"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Cache Doxygen
uses: actions/cache@v3
id: doxygen-cache
with:
path: "~/doxygen"
key: doxygen-1
- name: Install Cache Doxygen
env:
CACHE_HIT: ${{steps.doxygen-cache.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" == 'true' ]]; then
sudo cp --force --recursive ~/doxygen/* /
else
sudo apt-get install doxygen
mkdir -p ~/doxygen
for dep in doxygen; do
dpkg -L $dep | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/doxygen/
done
fi
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE
- name: Generate Documentation
working-directory: ${{runner.workspace}}/build
shell: bash
run: make docs && make dark-docs
- name: Move Dark Docs into Proper Location
working-directory: ${{runner.workspace}}/unified/Documentation
shell: bash
run: mv dark light/
- name: Deploy Documents to Github Pages
if: github.event_name == 'push'
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: Documentation/light
CLEAN: true