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