Skip to content

Commit

Permalink
Include doc generation in github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nroggeman-ledger committed Jun 27, 2024
1 parent d7b9363 commit 64270aa
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Documentation generation & update

on:
push:
tags:
- '*'
branches:
- master
pull_request:
branches:
- master

jobs:
generate:
name: Generate the documentation
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install APT dependencies
run: |
sudo apt-get update
sudo apt-get install graphviz doxygen
- name: Generate the documentation
run: make doc
- name: Upload documentation bundle
uses: actions/upload-artifact@v4
with:
name: documentation
path: build/doc/html/

deploy:
name: Deploy the documentation on Github pages
runs-on: ubuntu-latest
needs: generate
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- name: Download documentation bundle
uses: actions/download-artifact@v4
- name: Deploy documentation on pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation/

0 comments on commit 64270aa

Please sign in to comment.