From 06b489a1bf38720c329a7140cae3af48170cdc55 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Tue, 20 Dec 2022 09:08:46 -0600 Subject: [PATCH] Addition of a github action to build and publish omniperf documentation using sphinx and a rtd theme. This action is triggered via documentation-related changes landed on the "main" branch (#22). Signed-off-by: Karl W. Schulz --- .github/workflows/docs.yml | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..5d7789692c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,56 @@ +name: Documentation + +on: + push: + branches: ["main"] + paths: + - 'src/docs' + - '.github/workflows/docs.yml' + - 'VERSION' + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + container: + image: sphinxdoc/sphinx + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Additional python packages + run: pip3 install recommonmark myst_parser sphinx_rtd_theme + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Build html + run: | + cd src/docs + make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./src/docs/_build/html + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 +