From ade4792ed44e2400b468a6c7ec27a83e2fa2b964 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Wed, 29 May 2024 17:27:51 +0200
Subject: [PATCH] [doc] Host documentation on readthedocs.org

---
 .readthedocs.yaml | 17 +++++++++++++++++
 README.md         |  2 +-
 pyproject.toml    |  2 +-
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 .readthedocs.yaml

diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 00000000..bdc414e7
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,17 @@
+# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+version: 2
+
+build:
+  os: "ubuntu-22.04"
+  tools:
+    python: "3.11"
+
+python:
+  install:
+    - method: pip
+      path: .
+      extra_requirements:
+        - doc
diff --git a/README.md b/README.md
index 12c83b13..31ec4154 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idia
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
-[![latest-docs](https://img.shields.io/badge/docs-latest-orange.svg)](https://www.idiap.ch/software/biosignal/docs/biosignal/software/mednet/main/sphinx/index.html)
+[![latest-docs](https://img.shields.io/badge/docs-latest-orange.svg)](https://mednet.readthedocs.io/en/latest/)
 [![build](https://gitlab.idiap.ch/biosignal/software/mednet/badges/main/pipeline.svg)](https://gitlab.idiap.ch/biosignal/software/mednet/commits/main)
 [![coverage](https://gitlab.idiap.ch/biosignal/software/mednet/badges/main/coverage.svg)](https://www.idiap.ch/software/biosignal/docs/biosignal/software/mednet/main/coverage/index.html)
 [![repository](https://img.shields.io/badge/gitlab-project-0000c0.svg)](https://gitlab.idiap.ch/biosignal/software/mednet)
diff --git a/pyproject.toml b/pyproject.toml
index 395e560e..e18ec7a8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -52,7 +52,7 @@ dependencies = [
 ]
 
 [project.urls]
-documentation = "https://www.idiap.ch/software/biosignal/software/docs/biosignal/software/mednet/main/sphinx/"
+documentation = "https://mednet.readthedocs.io/en/latest/"
 homepage = "https://pypi.org/project/mednet"
 repository = "https://gitlab.idiap.ch/biosignal/software/mednet"
 changelog = "https://gitlab.idiap.ch/biosignal/software/mednet/-/releases"
-- 
GitLab