blob: 88dfc821d6245644499a0bffd13d1b151322334d (
plain)
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
|
name: Generate and Deploy Doxygen Documentation with m.css
on:
push:
branches:
- master # Replace with your default branch if different
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Step 2: Install Doxygen and Python
- name: Install Doxygen and Python
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz python3 python3-pip
# Step 3: Clone m.css repository
- name: Clone m.css
run: |
mkdir -p docs/m.css
git clone --depth 1 https://github.com/mosra/m.css.git docs/m.css
# Step 4: Create Doxyfile
- name: Create Doxyfile
run: |
echo "PROJECT_NAME = fbgl" > Doxyfile
echo "PROJECT_NUMBER = 0.1.0" >> Doxyfile
echo "OUTPUT_DIRECTORY = docs" >> Doxyfile
echo "INPUT = fbgl.h README.md" >> Doxyfile
echo "USE_MDFILE_AS_MAINPAGE = README.md" >> Doxyfile
echo "FILE_PATTERNS = *.h *.md" >> Doxyfile
echo "RECURSIVE = NO" >> Doxyfile
echo "GENERATE_HTML = YES" >> Doxyfile
echo "HTML_OUTPUT = html" >> Doxyfile
echo "GENERATE_LATEX = NO" >> Doxyfile
echo "GENERATE_MAN = NO" >> Doxyfile
echo "GENERATE_RTF = NO" >> Doxyfile
echo "QUIET = YES" >> Doxyfile
echo "EXTENSION_MAPPING = md=markdown" >> Doxyfile
echo "MARKDOWN_SUPPORT = YES" >> Doxyfile
# Step 5: Run Doxygen to generate raw HTML files
- name: Run Doxygen
run: doxygen Doxyfile
# Step 6: Process HTML with m.css
- name: Apply m.css
run: |
python3 docs/m.css/documentation/doxygen.py \
--input docs/html \
--output docs/html \
--site-root . \
--deploy
# Step 7: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/html
publish_branch: gh-pages
|