-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to render documentation
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: "[email protected]" |