docs: improve installation guide and restructure documentation config… #256
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-latest | |
| name: build up document and deploy | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@master | |
| - name: Update APT and remove custom mirrors | |
| run: | | |
| sudo rm -f /etc/apt/apt-mirrors.txt | |
| sudo apt-get update | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y libpng-tools libpng-dev libpango1.0-dev python3-setuptools | |
| pip3 install --upgrade pip | |
| pip3 install -r docs/requirements.txt | |
| pip3 install -r requirements.txt | |
| - name: Build document with Sphinx | |
| run: | | |
| cd docs | |
| export PATH="$PATH:/home/runner/.local/bin" | |
| export SPHINXBUILD="python3 -m sphinx" | |
| make html | |
| - name: Deploy to GitHub pages | |
| if: ${{ github.event_name == 'push' }} | |
| uses: JamesIves/github-pages-deploy-action@3.7.1 | |
| with: | |
| ACCESS_TOKEN: ${{ secrets.DOC_DEPLOY_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: docs/build/html |