From f10acd0b1bd517bfa85fc60c41040edb0d525121 Mon Sep 17 00:00:00 2001 From: Joan Puigcerver Date: Wed, 25 Mar 2026 18:46:40 +0100 Subject: [PATCH 1/3] switch to properdocs --- .github/workflows/deploy-docs.yml | 58 +++++++++++++++++++++---------- mkdocs_data_plugin/__init__.py | 6 +++- mkdocs.yml => properdocs.yml | 2 +- pyproject.toml | 9 ++--- 4 files changed, 50 insertions(+), 25 deletions(-) rename mkdocs.yml => properdocs.yml (99%) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index b8ae821..0828e35 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,26 +1,46 @@ -name: deploy -on: +name: deploy +on: push: branches: - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: github-pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5 with: python-version: 3.x cache: 'pip' - - name: Install Python dependencies - run: python -m pip install --upgrade hatch - - name: Build and deploy - run: hatch -e doc run mkdocs gh-deploy --force + - name: Install dependencies + run: pip install -r requirements.txt + - name: Build + run: properdocs build --clean + - name: Upload static files as artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./site/ + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/mkdocs_data_plugin/__init__.py b/mkdocs_data_plugin/__init__.py index 181e9f0..216eba4 100644 --- a/mkdocs_data_plugin/__init__.py +++ b/mkdocs_data_plugin/__init__.py @@ -1 +1,5 @@ -version = "0.2.0" +import properdocs.replacement_warning + +properdocs.replacement_warning.setup() + +version = "0.3.0" diff --git a/mkdocs.yml b/properdocs.yml similarity index 99% rename from mkdocs.yml rename to properdocs.yml index 7d2cecd..d4dc5aa 100644 --- a/mkdocs.yml +++ b/properdocs.yml @@ -17,7 +17,7 @@ exclude_docs: | _* theme: - name: material + name: materialx icon: logo: material/file-send-outline palette: diff --git a/pyproject.toml b/pyproject.toml index 6aed220..30dbfd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,8 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ - "mkdocs>=1.5.2", + "mkdocs>=1.5.2,<2.0", + "properdocs>=1.6", "mkdocs-macros-plugin>=1.2.0", ] @@ -63,17 +64,17 @@ type = ["default"] [tool.hatch.envs.doc] dependencies = [ - "mkdocs-material[imaging]~=9.5", + "mkdocs-materialx[imaging]~=10.1", "mkdocs-alias-plugin~=0.8", "mkdocs-git-revision-date-localized-plugin~=1.2", ] [tool.hatch.envs.doc.scripts] serve = [ - "mkdocs serve", + "properdocs serve", ] build = [ - "mkdocs build", + "properdocs build", ] [tool.hatch.envs.style] From 899f4f85569449e86076bf46b907ace0f843ed11 Mon Sep 17 00:00:00 2001 From: Joan Puigcerver Date: Wed, 25 Mar 2026 18:51:47 +0100 Subject: [PATCH 2/3] checks dont run on draft PR --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 432aaec..7ead9c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: jobs: test: + if: github.event.pull_request.draft == false || github.event_name != 'pull_request' strategy: max-parallel: 5 matrix: @@ -44,6 +45,7 @@ jobs: shell: bash lint: + if: github.event.pull_request.draft == false || github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From a0819af0a1f8fa8ddc1c27fc40069aa4cfe2ae5b Mon Sep 17 00:00:00 2001 From: Joan Puigcerver Date: Wed, 25 Mar 2026 18:53:11 +0100 Subject: [PATCH 3/3] checks run when ready for review event --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ead9c2..1456868 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize', 'ready_for_review'] branches: - '**'