Skip to content

Commit 73c79cf

Browse files
author
Jakub Cechacek
committed
Generate docs only when pushing to main
1 parent 58c75d4 commit 73c79cf

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/push_main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.11"
17+
- name: Create html documentation
18+
run: |
19+
pip install --user pdoc3
20+
python setup.py install
21+
pdoc --html -f -o .\docs keboola.component
22+
mv .docs/keboola/component/* docs
23+
rm -r .docs/keboola
24+
- name: Commit docs
25+
run: |
26+
git config --global user.name 'KCF'
27+
git config --global user.email 'kcf@users.noreply.github.com'
28+
git commit --allow-empty -am "Automated html docs build"
29+
git push

0 commit comments

Comments
 (0)