-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
15 additions
and
148 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 |
---|---|---|
|
@@ -8,13 +8,6 @@ on: | |
- clients/py/** | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- clients/js/** | ||
- contracts/** | ||
- clients/py/** | ||
branches: | ||
- main | ||
|
||
# Cancel in-progress jobs on same branch. | ||
concurrency: | ||
|
@@ -165,12 +158,26 @@ jobs: | |
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements.dev.txt | ||
pip install sphinx sphinx-rtd-theme myst-parser | ||
pip install sphinx myst-parser | ||
make | ||
pip install dist/sapphire.py-*.whl | ||
- name: Build docs | ||
run: | | ||
mkdir docs | ||
cd docs | ||
sphinx-quickstart --quiet --sep --project=sapphirepy --copyright="2024, Oasis Protocol Foundation" --author="[email protected]" --ext-autodoc --ext-viewcode | ||
pip install furo | ||
sed -i "s/^html_theme = 'alabaster'/html_theme = 'furo'/" source/conf.py | ||
# Modify conf.py programmatically | ||
sed -i "s/^extensions = \[/extensions = [\n 'myst_parser',/" source/conf.py | ||
echo "source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}" >> source/conf.py | ||
sed -i '/^Add your content/,/details\.$/d; /^sapphirepy documentation$/,/^=\+$/c\sapphirepy documentation\n========================\n\n.. automodule:: sapphirepy\n :members:\n :undoc-members:\n :show-inheritance:\n\n.. include:: ../../README.md\n :parser: markdown\n' source/index.rst | ||
echo -e "\n modules" >> source/index.rst | ||
cd .. # Back to project root | ||
sphinx-apidoc -o docs/source/ $(pip show sapphire-py | grep Location | cut -d' ' -f2)/sapphirepy | ||
cd docs | ||
make html | ||
|
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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