diff --git a/.github/workflows/ci-python.yaml b/.github/workflows/ci-python.yaml index ec48038..d5652cb 100644 --- a/.github/workflows/ci-python.yaml +++ b/.github/workflows/ci-python.yaml @@ -211,3 +211,40 @@ jobs: repository-url: https://test.pypi.org/legacy/ - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + docs: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: Swatinem/rust-cache@v2 + - name: Install uv + uses: astral-sh/setup-uv@v3 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: x86_64 + args: --release --out dist --manifest-path moyopy/Cargo.toml + sccache: 'true' + manylinux: auto + - name: Install + run: | + set -e + uv pip install --system --no-index --find-links dist moyopy + uv pip install --system moyopy[testing,docs] + - name: Build + run: | + sphinx-build moyopy/docs docs_build + - name: Deploy + if: ${{ github.event_name == 'push' }} + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs_build + destination_dir: python diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 10b611a..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Set the OS, Python version, and other tools you might need -build: - os: ubuntu-24.04 - tools: - python: "3" - jobs: - post_checkout: - - git fetch --unshallow || true - -# Build documentation in the "docs/" directory with Sphinx -sphinx: - configuration: moyopy/docs/conf.py - -# Optionally, but recommended, -# declare the Python requirements required to build your documentation -# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -python: - install: - - path: moyopy - extra_requirements: - - docs