-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (84 loc) · 2.63 KB
/
generate_documentation.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
# From: https://github.com/nullromo/doxygen-example/blob/main/.github/workflows/main.yml
name: Doxygen Action
on:
push:
branches: [main]
permissions:
contents: write
jobs:
generate_page:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Eleventy
run:
sudo npm install -g @11ty/eleventy
- name: Build Site and Copy
run: |
cd site
pnpm install
pnpm run build
- name: Build Doxygen documentation for Admin Panel
uses: mattnotmitt/[email protected]
with:
doxyfile-path: "./Doxyfile"
working-directory: "./app/admin_panel"
- name: Build Doxygen documentation for Raspberry Pi
uses: mattnotmitt/[email protected]
with:
doxyfile-path: "./Doxyfile"
working-directory: "./app/rpi"
- name: Build Doxygen documentation for Other Code Projects
uses: mattnotmitt/[email protected]
with:
doxyfile-path: "./Doxyfile"
working-directory: "./app/other"
- name: Move Doxygen HTML files
run: |
mkdir -p site/_site/docs/admin_panel
mkdir -p site/_site/docs/raspberry_pi
mkdir -p site/_site/docs/other
sudo mv site/docs/admin_panel/html/* site/_site/docs/admin_panel
sudo mv site/docs/raspberry_pi/html/* site/_site/docs/raspberry_pi
sudo mv site/docs/other/html/* site/_site/docs/other
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/_site
build_doxygen_pdf:
if: false
needs: generate_page
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: gh-pages
- name: Generate Doxygen PDF
run: |
sudo apt-get update -y
sudo apt-get install -y doxygen-latex
cd docs/admin_panel/latex
sudo make
cd ../../..
cd docs/raspberry_pi/latex
sudo make
cd ../../..
cd docs/other/latex
sudo make
- name: Commit PDF
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'gh-pages'