Merge pull request #16 from second-ed/dev #28
This file contains hidden or 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
| name: publish docs | |
| on: | |
| push: | |
| branch: | |
| - "main" | |
| jobs: | |
| publish_sphinx_docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install -e . | |
| pip install sphinx | |
| - name: Sphinx build | |
| run: | | |
| sphinx-apidoc -o docs/source src/class_inspector/ --separate | |
| sphinx-build docs/source docs/docs-build/html | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| publish_branch: gh-pages | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/docs-build/html | |
| force_orphan: true |