Skip to content

Commit eae9fe7

Browse files
committed
Doc: Style and build flow alignment
1 parent 7663cc0 commit eae9fe7

File tree

14 files changed

+101
-421
lines changed

14 files changed

+101
-421
lines changed

.github/doxygen.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/linkchecker.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 13 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,33 @@
1-
name: Build Doxygen Documentation
1+
name: Build documentation
22

33
on:
44
workflow_dispatch:
55
pull_request:
66
push:
77
branches: [main]
8+
release:
9+
types: [published]
810

911
concurrency:
1012
group: ${{ github.workflow }}-${{ github.ref }}
1113
cancel-in-progress: true
1214

13-
env:
14-
DOXYGEN_VERSION: 1.9.6
15-
DOXYGEN_URL: 'https://sourceforge.net/projects/doxygen/files/rel-{VERSION}/doxygen-{VERSION}.linux.bin.tar.gz/download'
16-
1715
jobs:
18-
documentation:
16+
Build documentation:
1917
runs-on: ubuntu-22.04
2018
steps:
21-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2220
with:
2321
fetch-depth: 0
2422

25-
- name: Install packages
26-
shell: bash
27-
run: |
28-
sudo apt-get update
29-
sudo pip install LinkChecker
30-
31-
- name: Cache Doxygen ${{ env.DOXYGEN_VERSION }}
32-
id: cache-doxygen
33-
uses: actions/cache@v3
34-
with:
35-
path: /opt/doxygen-${{ env.DOXYGEN_VERSION }}
36-
key: doxygen-${{ env.DOXYGEN_VERSION }}-${{ runner.os }}
37-
38-
- name: Download Doxygen ${{ env.DOXYGEN_VERSION }}
39-
if: steps.cache-doxygen.outputs.cache-hit != 'true'
40-
shell: bash
41-
run: |
42-
wget -O doxygen.tgz $(sed -e 's/{VERSION}/${{ env.DOXYGEN_VERSION }}/g' <<< ${{ env.DOXYGEN_URL }})
43-
sudo tar -C /opt -xf doxygen.tgz
44-
45-
- name: Install Doxygen ${{ env.DOXYGEN_VERSION }}
46-
if: env.DOXYGEN_VERSION != 'none'
47-
shell: bash
48-
run: |
49-
sudo ln -s /opt/doxygen-${{ env.DOXYGEN_VERSION }}/bin/doxygen /usr/local/bin/
50-
which doxygen
51-
doxygen --version
52-
53-
- name: Generate doxygen
54-
shell: bash
55-
env:
56-
GH_TOKEN: ${{ github.token }}
57-
run: |
58-
echo "::add-matcher::.github/doxygen.json"
59-
./Documentation/Doxygen/gen_doc.sh
60-
echo "::remove-matcher owner=doxygen::"
61-
62-
- name: Run linkchecker
63-
shell: bash
23+
- name: Fetch tags
24+
if: github.event_name == 'release'
6425
run: |
65-
echo "::add-matcher::.github/linkchecker.json"
66-
./Documentation/Doxygen/check_links.sh
67-
echo "::remove-matcher owner=linkchecker::"
26+
git fetch --tags --force
6827
69-
- name: Archive documentation
70-
if: github.event_name == 'pull_request'
71-
uses: actions/upload-artifact@v3
28+
- uses: Open-CMSIS-Pack/gen-pack-action@main
7229
with:
73-
name: documentation
74-
path: ./Documentation/html/
75-
retention-days: 1
76-
if-no-files-found: error
77-
78-
- name: Archive documentation
79-
if: (github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
80-
shell: bash
81-
run: |
82-
tar -cvjf /tmp/doc.tbz2 -C ./Documentation/html/ .
83-
84-
- uses: actions/checkout@v3
85-
if: (github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
86-
with:
87-
ref: gh-pages
88-
89-
- name: Publish documentation
90-
if: (github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
91-
shell: bash
92-
run: |
93-
rm -rf ${GITHUB_REF_NAME}
94-
mkdir -p ${GITHUB_REF_NAME}
95-
tar -xvjf /tmp/doc.tbz2 -C ${GITHUB_REF_NAME}
96-
if ${{ github.event_name == 'release' }}; then
97-
rm -f latest
98-
ln -s ${GITHUB_REF_NAME} latest
99-
MSG="release"
100-
else
101-
MSG="branch"
102-
fi
103-
.github/update_versions.sh
104-
git config user.name github-actions
105-
git config user.email github-actions@github.com
106-
git add .
107-
git commit -m "Update documentation for ${MSG} ${GITHUB_REF_NAME}"
108-
git push
109-
110-
- uses: actions/checkout@v3
111-
if: (github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
112-
with:
113-
ref: ${{ github.ref }}
114-
115-
- name: Trigger GH-Pages deployment
116-
if: (github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
117-
shell: bash
118-
env:
119-
GH_TOKEN: ${{ github.token }}
120-
run: |
121-
gh workflow run gh-pages.yml --ref gh-pages
122-
if [ $? -ne 0 ]; then
123-
echo "::notice::Failed to trigger GH-Pages deployment via workflow 'gh-pages.yml'!"
124-
fi
125-
30+
doxygen-version: 1.9.6
31+
gen-doc-script: ./Documentation/Doxygen/gen_doc.sh
32+
doc-path: ./Documentation/html
33+
gh-pages-branch: gh-pages

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

3535
- name: Setup Pages
3636
uses: actions/configure-pages@v3
3737

3838
- name: Upload artifact
39-
uses: actions/upload-pages-artifact@v1
39+
uses: actions/upload-pages-artifact@v2
4040
with:
4141
# Upload entire repository
4242
path: '.'
4343

4444
- name: Deploy to GitHub Pages
4545
id: deployment
46-
uses: actions/deploy-pages@v1
46+
uses: actions/deploy-pages@v2

Documentation/Doxygen/check_links.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

Documentation/Doxygen/dap.dxy.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ FILE_VERSION_FILTER =
795795
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
796796
# tag is left empty.
797797

798-
LAYOUT_FILE = ./style_template/Layout_forUser.xml
798+
LAYOUT_FILE = ./style_template/layout.xml
799799

800800
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
801801
# the reference definitions. This must be a list of .bib files. The .bib
@@ -921,7 +921,7 @@ INPUT = ./src/mainpage.md \
921921
./src/dap_firmware.md \
922922
./src/dap_drv_install.md \
923923
./src/dap_validate.md \
924-
./src/Ref_dap.txt \
924+
./src/ref_dap.txt \
925925
../../Firmware/Template \
926926
../../Firmware/Config
927927

@@ -1393,7 +1393,7 @@ HTML_EXTRA_STYLESHEET = ./style_template/extra_stylesheet.css \
13931393
HTML_EXTRA_FILES = ./style_template/tabs.css \
13941394
./style_template/version.css \
13951395
./style_template/tab_b.png \
1396-
./style_template/printComponentTabs.js \
1396+
./style_template/tabs.js \
13971397
./style_template/darkmode_toggle.js \
13981398
./style_template/navtree.js \
13991399
./style_template/dropdown.png
@@ -1738,7 +1738,7 @@ ENUM_VALUES_PER_LINE = 1
17381738
# Minimum value: 0, maximum value: 1500, default value: 250.
17391739
# This tag requires that the tag GENERATE_HTML is set to YES.
17401740

1741-
TREEVIEW_WIDTH = 250
1741+
TREEVIEW_WIDTH = 320
17421742

17431743
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
17441744
# external symbols imported via tag files in a separate window.

0 commit comments

Comments
 (0)