From 64270aa912631825f658a6eef9b0be6a88fe7ceb Mon Sep 17 00:00:00 2001 From: Nicolas Roggeman Date: Thu, 27 Jun 2024 13:55:19 +0200 Subject: [PATCH] Include doc generation in github workflows --- .github/workflows/documentation.yml | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 000000000..a8da2225e --- /dev/null +++ b/.github/workflows/documentation.yml @@ -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/