generated from vanHeemstraSystems/template-default-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.79 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
name: NFC Reader Hardware Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
generate-docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./nfc-reader-docs
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: Configure Doxygen
run: |
cd docs
sed -i 's/GENERATE_LATEX = NO/GENERATE_LATEX = YES/' Doxyfile
sed -i 's/LATEX_OUTPUT = latex/LATEX_OUTPUT = pdf/' Doxyfile
sed -i 's/GENERATE_PDF = NO/GENERATE_PDF = YES/' Doxyfile
- name: Generate Documentation
run: |
cd docs
doxygen Doxyfile
- 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: nfc-reader-docs/docs/pdf/latex/refman.pdf
retention-days: 30