From 2e4c8316f72bbd442772459bc28b962b1f526635 Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:54:04 +0800 Subject: [PATCH 1/3] chore: add Node.js 22 to build tools in English and Chinese documentation configurations --- docs/en/.readthedocs.yaml | 1 + docs/zh-CN/.readthedocs.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/en/.readthedocs.yaml b/docs/en/.readthedocs.yaml index 7961d76..a56625c 100644 --- a/docs/en/.readthedocs.yaml +++ b/docs/en/.readthedocs.yaml @@ -9,6 +9,7 @@ build: os: ubuntu-22.04 tools: python: "3.10" + nodejs: "22" jobs: pre_build: # Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml diff --git a/docs/zh-CN/.readthedocs.yaml b/docs/zh-CN/.readthedocs.yaml index 6cba154..bdb6cc8 100644 --- a/docs/zh-CN/.readthedocs.yaml +++ b/docs/zh-CN/.readthedocs.yaml @@ -9,6 +9,7 @@ build: os: ubuntu-22.04 tools: python: "3.10" + nodejs: "22" jobs: pre_build: # Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml From eedcfabb1a6ba50a7962a78696f78add18446e93 Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:39:51 +0800 Subject: [PATCH 2/3] chore: pin jupyter-book version to <2 in setup.py and requirements-doc.txt, remove unnecessary comment from Makefile --- Makefile | 1 - docs/requirements-doc.txt | 5 +++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 680aa7f..555d7f1 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,6 @@ gen-example-from-base: cp -r docs/examples/en/* docs/en/examples/ cp -r docs/examples/zh/* docs/zh-CN/examples/ -# Note the first line relies on jupyterbook==0.11.3 doc: rm-doc gen-doc-config gen-example-from-base jupyter-book build docs/en/ jupyter-book build docs/zh-CN/ diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index 68bc552..38c7d09 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -1,5 +1,6 @@ -jupyter-book +jupyter-book<2 conflux-web3 cfx-utils>=1.0.1 +mmg==2.0.0 sphinx-autodoc-typehints -# sphinx-design \ No newline at end of file +# sphinx-design diff --git a/setup.py b/setup.py index 514aba5..afbe1b0 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ # "py-solc>=0.4.0", # "pytest>=6.2.5,<7", # "sphinx>=4.2.0,<5", - "jupyter-book", + "jupyter-book<2", "mmg==2.0.0", "sphinx-autodoc-typehints", # "sphinx_rtd_theme>=0.1.9", From 877fdf46c6b3507335b4d763499ed6c6cafa709c Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:47:48 +0800 Subject: [PATCH 3/3] chore: add GitHub Actions workflow for building documentation on pull requests and pushes to 'v1' branch --- .github/workflows/docs.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..357355c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,28 @@ +name: docs + +on: + pull_request: + branches: ["dev", "v1"] + push: + branches: ["v1"] + +jobs: + build-docs: + name: Build docs + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install doc dependencies + run: | + pip install ".[docs]" + + - name: Build documentation + run: | + make doc