Build Docs #21
This file contains 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: Build Docs | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python - --version 1.3.2 | |
poetry install --with docs --all-extras | |
echo "PYTHONPATH=`pwd`" >> $GITHUB_ENV | |
- name: Build Docs | |
run: | | |
sudo apt-get update -y && sudo apt-get install -y pandoc python3-pkg-resources python3-setuptools | |
poetry run sphinx-build -b html -a docs docs/site | |
- name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/site |