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 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/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/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/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 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",