Skip to content

Commit

Permalink
Update workflow, remove docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigaMr committed Dec 4, 2024
1 parent 64e7a8f commit 8fb8e5b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 148 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions clients/py/docs/Makefile

This file was deleted.

Empty file removed clients/py/docs/source/.nojekyll
Empty file.
40 changes: 0 additions & 40 deletions clients/py/docs/source/conf.py

This file was deleted.

25 changes: 0 additions & 25 deletions clients/py/docs/source/index.rst

This file was deleted.

7 changes: 0 additions & 7 deletions clients/py/docs/source/modules.rst

This file was deleted.

45 changes: 0 additions & 45 deletions clients/py/docs/source/sapphirepy.rst

This file was deleted.

3 changes: 0 additions & 3 deletions clients/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,4 @@
url="https://github.com/oasisprotocol/sapphire-paratime",
version="0.3.0",
zip_safe=True,
package_data={
'sapphirepy': ['docs/*.html'], # Include all HTML docs
},
)

0 comments on commit 8fb8e5b

Please sign in to comment.