Skip to content

Commit

Permalink
CI: Generate and publish documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryelreyes committed Jul 22, 2024
1 parent b4953d5 commit aa3f712
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/documentation.yml
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

0 comments on commit aa3f712

Please sign in to comment.