diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml new file mode 100644 index 00000000..72cc5690 --- /dev/null +++ b/.github/workflows/docs-build.yml @@ -0,0 +1,20 @@ +name: Docs Build + +on: [push, pull_request] + +jobs: + docs-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.30.0 + cache: true + - name: Build Docs + run: pixi run -e docs docs + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: docs-build + path: docs/build/ diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 00000000..e30f628f --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,30 @@ +name: Docs Deploy + +on: + push: + branches: + - main + +jobs: + docs-deploy: + runs-on: ubuntu-latest + environment: + name: docs-deploy + steps: + - uses: actions/checkout@v4 + - name: Download Artifact + uses: dawidd6/action-download-artifact@v6 + with: + workflow: docs-build.yml + name: docs-build + path: docs/build/ + + # Note, the gh-pages deployment requires setting up a SSH deploy key. + # See + # https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key- + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs/_build/html + ssh-key: ${{ secrets.DEPLOY_KEY }} + force: no diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9699e665..41beb381 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,4 +78,3 @@ repos: hooks: - id: check-dependabot - id: check-github-workflows - - id: check-readthedocs diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index e2acbbee..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "3.12" - commands: - - asdf plugin add uv - - asdf install uv latest - - asdf global uv latest - - uv venv - - uv pip install .[docs] - - .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D - language=en docs $READTHEDOCS_OUTPUT/html - -sphinx: - configuration: docs/conf.py - -python: - install: - - requirements: docs/requirements.txt diff --git a/README.md b/README.md index 31cb7615..3b4b07b1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # array-api-extra [![Actions Status][actions-badge]][actions-link] -[![Documentation Status][rtd-badge]][rtd-link] [![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh) [![PyPI version][pypi-version]][pypi-link] @@ -20,8 +19,6 @@ [pypi-link]: https://pypi.org/project/array-api-extra/ [pypi-platforms]: https://img.shields.io/pypi/pyversions/array-api-extra [pypi-version]: https://img.shields.io/pypi/v/array-api-extra -[rtd-badge]: https://readthedocs.org/projects/array-api-extra/badge/?version=latest -[rtd-link]: https://array-api-extra.readthedocs.io/en/latest/?badge=latest