From 575d66b3e51f0ad3fdb21369b33e3a30fa485c8b Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Fri, 4 Oct 2024 12:36:11 +0200 Subject: [PATCH] Add workflow to render documentation --- .github/workflows/render-documentation.yml | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/render-documentation.yml diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml new file mode 100644 index 0000000..8b6235b --- /dev/null +++ b/.github/workflows/render-documentation.yml @@ -0,0 +1,36 @@ +name: Render Documentation + +on: + push: + branches: + - main + - docs + paths: + - ".github/workflows/render-documentation.ya?ml" + - "src/**" + workflow_dispatch: + +jobs: + render-docs: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + if: github.event_name != 'pull_request' + - uses: actions/checkout@v4 + if: github.event_name == 'pull_request' + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + - name: Install dependencies + run: pip3 install pydoc-markdown + - name: Render documentation + run: pydoc-markdown + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Update documentation" + file_pattern: "docs/**" + commit_user_name: "GitHub Action" + commit_user_email: "action@github.com" \ No newline at end of file