From b95a83fa00085b2427189dd3bcced15493b49393 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 13:36:45 -0500 Subject: [PATCH 01/10] add docs install group --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2f6d93c..e2fd6b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,9 @@ examples = [ "matplotlib", "scikit-image[data]", ] +docs = [ + "mkdocs-material", +] [project.urls] "Homepage" = "https://github.com/timmonko/urssi-package" From bad06dc6ce95f9ff7befb7abf638af2d18eaa7c7 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 13:39:17 -0500 Subject: [PATCH 02/10] initialize mkdocs --- docs/index.md | 17 +++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 18 insertions(+) create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..000ea34 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,17 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..c97182f --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1 @@ +site_name: My Docs From 5de3d1e0fcc4f38f937d3c3a66874d3c36557c43 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 14:02:27 -0500 Subject: [PATCH 03/10] use material theme --- docs/index.md | 4 ++++ mkdocs.yml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 000ea34..ab4c1e5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,6 +2,10 @@ For full documentation visit [mkdocs.org](https://www.mkdocs.org). +## Hello URSSI + +## What's up? + ## Commands * `mkdocs new [dir-name]` - Create a new project. diff --git a/mkdocs.yml b/mkdocs.yml index c97182f..9b89f49 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1 +1,4 @@ -site_name: My Docs +site_name: URSSI Package Documentation +site_url: https://timmonko.github.io/urssi-package/ +theme: + name: material From 4930e6f67134c236408d0e1b83a941dd02d1d0b7 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 14:42:52 -0500 Subject: [PATCH 04/10] add deploy workflow --- .github/workflows/deploy_docs.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy_docs.yml diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000..016d91f --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,28 @@ +name: Deploy Docs + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + + - name: Test that docs build without error + if: github.event_name == 'pull_request' + run: uv run mkdocs build --strict + + - name: Deploy docs to GitHub Pages + if: github.event_name == 'push' + run: uv run mkdocs gh-deploy --strict --force \ No newline at end of file From 50503e9811e2737c27539b29c293f702d65ca73e Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 14:44:28 -0500 Subject: [PATCH 05/10] add site to gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b336e63..a6b8acf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ wheels/ .venv # uv -uv.lock \ No newline at end of file +uv.lock + +site/ \ No newline at end of file From e0ca22dec3f6e42ff4c9e2ed7cf41f67d080701d Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 14:50:05 -0500 Subject: [PATCH 06/10] fix ci --- .github/workflows/deploy_docs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 016d91f..cc4edfc 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,8 +21,10 @@ jobs: - name: Test that docs build without error if: github.event_name == 'pull_request' - run: uv run mkdocs build --strict + run: uv pip install "[docs]" | + mkdocs build --strict + - name: Deploy docs to GitHub Pages if: github.event_name == 'push' - run: uv run mkdocs gh-deploy --strict --force \ No newline at end of file + run: uvx mkdocs gh-deploy --strict --force \ No newline at end of file From f15abc77ba08701a9f8d5a23a8986fce4ff9fd93 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 14:50:52 -0500 Subject: [PATCH 07/10] add . for install --- .github/workflows/deploy_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index cc4edfc..6523739 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,7 +21,7 @@ jobs: - name: Test that docs build without error if: github.event_name == 'pull_request' - run: uv pip install "[docs]" | + run: uv pip install ".[docs]" | mkdocs build --strict From ed8b562d6efbd120d6b32a96259372ffd857f003 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 15:18:11 -0500 Subject: [PATCH 08/10] use multiline for env setup --- .github/workflows/deploy_docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 6523739..5d7fc17 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,7 +21,9 @@ jobs: - name: Test that docs build without error if: github.event_name == 'pull_request' - run: uv pip install ".[docs]" | + run: | + uv venv + uv pip install ".[docs]" mkdocs build --strict From 7b8428059f319391496bde15f36b66f3f006f2a1 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 15:24:28 -0500 Subject: [PATCH 09/10] add extra to uv run --- .github/workflows/deploy_docs.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 5d7fc17..37e9dc7 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,12 +21,9 @@ jobs: - name: Test that docs build without error if: github.event_name == 'pull_request' - run: | - uv venv - uv pip install ".[docs]" - mkdocs build --strict + run: uv run --extra docs mkdocs build --strict --force - name: Deploy docs to GitHub Pages if: github.event_name == 'push' - run: uvx mkdocs gh-deploy --strict --force \ No newline at end of file + run: uv run --extra docs mkdocs gh-deploy --strict --force \ No newline at end of file From 8f91fdb0a6a4bd0e7ca6d1c30a162cd2487ee051 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 13 Aug 2025 15:26:19 -0500 Subject: [PATCH 10/10] remove --force from build --- .github/workflows/deploy_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 37e9dc7..dafbe0b 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,7 +21,7 @@ jobs: - name: Test that docs build without error if: github.event_name == 'pull_request' - run: uv run --extra docs mkdocs build --strict --force + run: uv run --extra docs mkdocs build --strict - name: Deploy docs to GitHub Pages