Skip to content

Commit 149b885

Browse files
Improve JSDoc and Doxygen documentation (#159)
* fix folder name * fix doxygen workflow version * work on doxygen and jsdoc workflow * Add offline mode zip * work on doxygen and jsdoc workflow * remove unnecessary files * Update JSDoc and Doxygen PDF --------- Co-authored-by: GitHub Actions <[email protected]>
1 parent 26a3ff5 commit 149b885

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+50969
-9649
lines changed

.github/workflows/doxygen-pdf.yml

-41
This file was deleted.

.github/workflows/jsdoc-doxygen.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Deploy Doxygen PDF and Update Docs
2+
on:
3+
push:
4+
branches: ["master"]
5+
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "docs"
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 21
25+
26+
- name: Install JSDoc
27+
run: npm install -g jsdoc
28+
29+
- name: Generate JSDoc
30+
run: jsdoc -c jsdoc.json
31+
32+
- name: Copy JSDoc to output folder
33+
run: |
34+
mkdir jsdoc
35+
cp -r ./docs/ jsdoc/
36+
37+
- name: Upload JSDoc
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: JSDoc
41+
path: jsdoc/
42+
43+
- name: Install Doxygen
44+
run: sudo apt-get install -y doxygen
45+
46+
- name: Install Graphviz
47+
run: sudo apt-get install -y graphviz
48+
49+
- name: Run Doxygen
50+
run: doxygen Doxyfile
51+
52+
- name: Generate PDF using LaTeX Action
53+
uses: xu-cheng/latex-action@v2
54+
with:
55+
working_directory: docs/latex/
56+
root_file: refman.tex
57+
58+
- name: Copy PDF to more visible location in docs and output folder
59+
run: |
60+
mkdir doxygen
61+
cp ./docs/latex/refman.pdf ./docs/hivtrace-viz-doxygen-docs.pdf
62+
cp ./docs/latex/refman.pdf ./doxygen/hivtrace-viz-doxygen-docs.pdf
63+
64+
- name: Upload Doxygen Docs PDF
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: Doxygen-PDF
68+
path: doxygen/hivtrace-viz-doxygen-docs.pdf
69+
70+
- name: Push updated docs to master
71+
run: |
72+
git config --global user.name 'GitHub Actions'
73+
git config --global user.email '[email protected]'
74+
git add docs/
75+
76+
# Check for changes
77+
if git diff-index --quiet HEAD --; then
78+
# No changes
79+
echo "No changes to commit"
80+
else
81+
# Changes detected
82+
git commit -m "Update JSDoc and Doxygen PDF"
83+
git push origin master
84+
fi

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ Navigate your browser to localhost:8273
2222
The HIV-Trace webpage was formerly hosted using github-pages at https://veg.github.io/hivtrace-viz/ but has been migrated to using a pm2 process at hivtrace-viz.hyphy.org (see veg/operations documentation for details).
2323

2424
The master branch of this repo should always be in sync with what is published to NPM and is live on the production website. With the exception of urgent bug fixes, all changes to veg/master should be done via pull requests from veg/develop.
25+
26+
27+
## Documentation
28+
29+
A basic JSDoc documentation of hivtrace-viz can be found at `docs/` and can be viewed by cloning the repository and opening `docs/index.html` in a browser (or running a basic web server in the `docs/` directory, e.g. `python -m http.server`).
30+
31+
A PDF version of the documentation can be found at `docs/hivtrace-viz-doxygen-docs.pdf`.
32+
33+
This documentation is generated automatically using `jsdoc -c jsdoc.json` and ran automatically as part of the CI/CD pipeline (see `.github/workflows/jsdoc-doxygen.yml`).

0 commit comments

Comments
 (0)