generated from vanHeemstraSystems/template-default-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (132 loc) · 4.17 KB
/
generate-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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: NFC Reader Hardware Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
doxygen \
graphviz \
texlive-full \
plantuml \
wget \
unzip
- name: Setup PlantUML
run: |
wget https://github.com/plantuml/plantuml/releases/download/v1.2024.3/plantuml-1.2024.3.jar
sudo mkdir -p /usr/local/bin
sudo mv plantuml-1.2024.3.jar /usr/local/bin/plantuml.jar
- name: Create Documentation Directory Structure
run: |
mkdir -p docs
- name: Create Doxyfile
run: |
cd docs
cat > Doxyfile << 'EOL'
# Doxyfile for NFC Reader Documentation
PROJECT_NAME = "NFC Reader Hardware Documentation"
PROJECT_NUMBER = 1.0.0
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = YES
ALLOW_UNICODE_NAMES = YES
OUTPUT_LANGUAGE = English
# Input files
INPUT = ../include ../src
FILE_PATTERNS = *.h *.cpp *.dox
RECURSIVE = YES
# Output formats
GENERATE_HTML = YES
GENERATE_LATEX = YES
GENERATE_RTF = NO
GENERATE_MAN = NO
GENERATE_XML = NO
# LaTeX options
LATEX_OUTPUT = pdf
COMPACT_LATEX = NO
PAPER_TYPE = a4
EXTRA_PACKAGES = {graphicx} {longtable}
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = YES
LATEX_HIDE_INDICES = NO
# Diagrams and graphs
HAVE_DOT = YES
DOT_PATH = /usr/bin/dot
PLANTUML_JAR_PATH = /usr/local/bin/plantuml.jar
# Source browsing
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
# Index generation
ALPHABETICAL_INDEX = YES
GENERATE_TREEVIEW = YES
# Preprocessing
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
# Dot tool configuration
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
# External references
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
# Warning and progress messages
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
# Other
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EOL
- name: Generate Documentation
run: |
cd docs
doxygen Doxyfile
- name: Fix Makefile Formatting
run: |
cd docs/pdf/latex
sed -i 's/^[[:space:]]\+/\t/g' Makefile
- name: Compile LaTeX to PDF
run: |
cd docs/pdf/latex
make
- name: Create Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'workflow_dispatch'
with:
files: |
docs/pdf/latex/refman.pdf
name: Hardware Documentation Release
tag_name: docs-v${{ github.sha }}
- name: Upload PDF Artifact
uses: actions/upload-artifact@v4
with:
name: nfc-reader-documentation
path: docs/pdf/latex/refman.pdf
retention-days: 30