From 037d792e1304220d544316316115d9f8807f1b79 Mon Sep 17 00:00:00 2001 From: Marco Niederberger Date: Mon, 19 Dec 2022 21:12:31 +0100 Subject: [PATCH 1/3] Add doxygen CI --- .github/workflows/doxygen.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/doxygen.yml diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml new file mode 100644 index 0000000..c539886 --- /dev/null +++ b/.github/workflows/doxygen.yml @@ -0,0 +1,12 @@ +name: Doxygen GitHub Pages Deploy Action + +on: + push: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: DenverCoder1/doxygen-github-pages-action@v1.2.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From f9165e99687f8bfb3bced785d77be5139b78bdb5 Mon Sep 17 00:00:00 2001 From: Marco Niederberger Date: Tue, 20 Dec 2022 21:20:30 +0100 Subject: [PATCH 2/3] Add gh pages and doxygen --- .github/workflows/doxygen.yml | 44 ++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index c539886..17d6b77 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -1,12 +1,50 @@ -name: Doxygen GitHub Pages Deploy Action +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages on: + # Runs on pushes targeting the default branch push: + # branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true jobs: + # Single deploy job since we're just deploying deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: DenverCoder1/doxygen-github-pages-action@v1.2.0 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Install dependencies + run: | + sudo apt-get install doxygen + sudo apt-get install graphviz + - name: Run doxygen + run: | + mkdir -p ./build/doxygen + doxygen + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + # Upload entire repository + path: './build/doxygen' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From 6413c79a938fdf2a7e7ca48a6f9baf851ac3d8d0 Mon Sep 17 00:00:00 2001 From: Marco Niederberger Date: Tue, 20 Dec 2022 21:22:05 +0100 Subject: [PATCH 3/3] Update doxygen.yml --- .github/workflows/doxygen.yml | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 17d6b77..cb76cab 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -1,50 +1,50 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +# @file documentation.yml +# @authors Gschwind, Weber, Schoch, Niederberger +# @copyright (c) 2022 LineGrip Corp Ltd. +# +# @brief This workflow builds our documentation every time we push to a +# feature branch and publishes the documentation to gh-page on release. + +name: Docs +on: + release: + types: [published] -on: - # Runs on pushes targeting the default branch push: - # branches: ["main"] + #uncomment if we switch to GitFlow + #branches-ignore: + #- main - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true + inputs: + publishDoc: + description: 'Publish to gh-pages [yes/no]' + required: true + default: 'no' jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + Deploy: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repo uses: actions/checkout@v3 - - name: Setup Pages - uses: actions/configure-pages@v2 - - name: Install dependencies - run: | - sudo apt-get install doxygen - sudo apt-get install graphviz + - name: Install apt-get packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: doxygen graphviz + version: 1.0 + - name: Run doxygen run: | + touch .nojekyll #disable page generator from GitHub mkdir -p ./build/doxygen + mkdir -p ./ghPages doxygen - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - # Upload entire repository - path: './build/doxygen' + cp -R ./build/doxygen ./ghPages/doxygen # Copy build documentation to release folder + - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 + if: github.ref == 'refs/heads/feature/buildDoxygen' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./ghPages # Source folder for gh-pages deploy