-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update project docs, add Sphinx docs pipeline (#14)
- Loading branch information
Showing
30 changed files
with
1,295 additions
and
164 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docs | ||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
env: | ||
python-version: 3.11 | ||
docs-build: docs/build/ | ||
permissions: | ||
contents: write | ||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Fetches remote repository without --progress option. | ||
# | ||
# The default behavior of @actions/checkout outputs many noisy lines of | ||
# status output in the workflow log, which is problematic for log size. | ||
# | ||
# Refer to the below PR for updates on this issue: | ||
# - https://github.com/actions/checkout/pull/1067 | ||
- name: Checkout latest repository commit | ||
# uses: actions/checkout@v3 | ||
uses: simonbaird/checkout@no-progress-option | ||
with: | ||
show-progress: false | ||
# submodules: recursive | ||
# Setup python virtual environment | ||
- name: Install poetry | ||
run: | | ||
bash ci/scripts/lib/install-poetry.sh | ||
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV | ||
- name: Setup Python ${{ env.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ env.python-version }} | ||
cache: poetry | ||
cache-dependency-path: poetry.lock | ||
# Setup Poetry virtual environment | ||
- name: Use matrix python version in Poetry virtualenv | ||
run: | | ||
poetry env use ${{ env.python-version }} | ||
- name: Setup Poetry plugins and project dependencies | ||
run: poetry install -n --with docs | ||
# Build docs | ||
- name: Sphinx build | ||
run: | | ||
poetry sphinx-build | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ${{ env.docs-build }} | ||
publish_branch: gh-pages | ||
force_orphan: true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.11" | ||
jobs: | ||
post_install: | ||
- pip install poetry==1.5.0 | ||
# Install docs dependencies into the same readthedocs virtualenv | ||
- poetry config virtualenvs.create false | ||
# - poetry install --no-root --only docs | ||
- poetry install --with docs | ||
|
||
# Build documentation under the `docs/build` directory with Sphinx | ||
sphinx: | ||
builder: html | ||
configuration: ci/tools/sphinx/conf.py |
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
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
Oops, something went wrong.