docs: improve installation guide and restructure documentation config… #253
Workflow file for this run
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: docs | |
| on: | |
| push: | |
| paths: | |
| - 'docs/**' | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-22.04 | |
| name: build up document and deploy | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-setuptools libpango1.0-dev | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r docs/requirements.txt | |
| pip install -r requirements.txt | |
| - name: Build document with Sphinx | |
| run: | | |
| cd docs | |
| make html | |
| - name: Deploy to GitHub pages | |
| if: ${{ github.event_name == 'push' }} | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: docs/build/html |