-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Generate and publish documentation
- Loading branch information
1 parent
b4953d5
commit aa3f712
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: documentation | ||
|
||
# Controls when the action will run. | ||
on: | ||
push: | ||
branches: ["**"] | ||
pull_request: | ||
branches: [main] | ||
release: | ||
# A release, pre-release, or draft of a release is published. | ||
types: [published] | ||
# Allows you to run this workflow manually from the Actions tab. | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel. | ||
jobs: | ||
# The introduction just shows some useful informations. | ||
intro: | ||
# The type of runner that the job will run on. | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job. | ||
steps: | ||
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | ||
|
||
# The build job will build the documentation. | ||
build: | ||
# The type of runner that the job will run on. | ||
runs-on: ubuntu-latest | ||
needs: intro | ||
permissions: | ||
contents: write | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job. | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up graphviz | ||
uses: ts-graphviz/setup-graphviz@v2 | ||
|
||
- name: Set up doxygen and generate documentation | ||
uses: mattnotmitt/doxygen-action@v1.9.8 | ||
with: | ||
working-directory: "./doc/doxygen" | ||
doxyfile-path: "./Doxyfile" | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: doc/api/html | ||
force_orphan: true |