Skip to content

Commit 01a9424

Browse files
authored
Merge pull request #11 from BlueAndi/doc/api_documentation
Automatically create API documentation
2 parents 7cec47a + aa3f712 commit 01a9424

File tree

2 files changed

+226
-82
lines changed

2 files changed

+226
-82
lines changed

.github/workflows/documentation.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: documentation
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
branches: ["**"]
7+
pull_request:
8+
branches: [main]
9+
release:
10+
# A release, pre-release, or draft of a release is published.
11+
types: [published]
12+
# Allows you to run this workflow manually from the Actions tab.
13+
workflow_dispatch:
14+
15+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
16+
jobs:
17+
# The introduction just shows some useful informations.
18+
intro:
19+
# The type of runner that the job will run on.
20+
runs-on: ubuntu-latest
21+
# Steps represent a sequence of tasks that will be executed as part of the job.
22+
steps:
23+
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
24+
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
25+
26+
# The build job will build the documentation.
27+
build:
28+
# The type of runner that the job will run on.
29+
runs-on: ubuntu-latest
30+
needs: intro
31+
permissions:
32+
contents: write
33+
34+
# Steps represent a sequence of tasks that will be executed as part of the job.
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
39+
- name: Set up graphviz
40+
uses: ts-graphviz/setup-graphviz@v2
41+
42+
- name: Set up doxygen and generate documentation
43+
uses: mattnotmitt/doxygen-action@v1.9.8
44+
with:
45+
working-directory: "./doc/doxygen"
46+
doxyfile-path: "./Doxyfile"
47+
48+
- name: Deploy to GitHub Pages
49+
uses: peaceiris/actions-gh-pages@v4
50+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
51+
with:
52+
publish_branch: gh-pages
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: doc/api/html
55+
force_orphan: true

0 commit comments

Comments
 (0)