Skip to content

Commit 575d66b

Browse files
committed
Add workflow to render documentation
1 parent 39f4cf0 commit 575d66b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Render Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- docs
8+
paths:
9+
- ".github/workflows/render-documentation.ya?ml"
10+
- "src/**"
11+
workflow_dispatch:
12+
13+
jobs:
14+
render-docs:
15+
permissions:
16+
contents: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
if: github.event_name != 'pull_request'
21+
- uses: actions/checkout@v4
22+
if: github.event_name == 'pull_request'
23+
with:
24+
repository: ${{ github.event.pull_request.head.repo.full_name }}
25+
ref: ${{ github.event.pull_request.head.ref }}
26+
- name: Install dependencies
27+
run: pip3 install pydoc-markdown
28+
- name: Render documentation
29+
run: pydoc-markdown
30+
- name: Commit changes
31+
uses: stefanzweifel/git-auto-commit-action@v4
32+
with:
33+
commit_message: "Update documentation"
34+
file_pattern: "docs/**"
35+
commit_user_name: "GitHub Action"
36+
commit_user_email: "[email protected]"

0 commit comments

Comments
 (0)