| 1 |
name: Auto Documentation |
| 2 |
|
| 3 |
on: |
| 4 |
release: |
| 5 |
types: [published] |
| 6 |
|
| 7 |
jobs: |
| 8 |
generate_docs: |
| 9 |
if: ${{ github.repository_owner == 'bczsalba' }} |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- name: Checkout master branch |
| 13 |
uses: actions/checkout@v2 |
| 14 |
|
| 15 |
- name: Set up Python |
| 16 |
uses: actions/setup-python@v2 |
| 17 |
with: |
| 18 |
python-version: "3.x" |
| 19 |
|
| 20 |
- name: Install pdoc & dependencies |
| 21 |
run: | |
| 22 |
python -m pip install --upgrade pip |
| 23 |
pip install pdoc |
| 24 |
pip install . |
| 25 |
|
| 26 |
- name: Generate documentation |
| 27 |
run: | |
| 28 |
pdoc -o ./docs pytermgui --logo https://github.com/bczsalba/pytermgui/blob/master/assets/title.png?raw=true --docformat google |
| 29 |
|
| 30 |
- name: Commit changes |
| 31 |
run: | |
| 32 |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 33 |
git config --local user.name "github-actions[bot]" |
| 34 |
git add ./docs/ |
| 35 |
git commit -m "Auto-update documentation" |
| 36 |
|
| 37 |
- name: Push changes |
| 38 |
uses: ad-m/github-push-action@master |