From 1a2e4447990dc3e08b9c5268ffe4346d842f1bc5 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 5 Jul 2023 16:36:26 -0400 Subject: [PATCH] Use Insiders version of `mkdocs-material` (#5540) ## Summary This PR migrates our `mkdocs-material` version to [Insiders](https://squidfunk.github.io/mkdocs-material/insiders/), which we can access now that we're sponsors. We can't allow public access to the Insiders version, so we instead have a private fork, which contains a deploy key that I've added as a read-only Actions secret in this repo. (That is: the deploy key only lets you read that one repo, and do nothing else.) In general, non-Astral contributors can use the non-insiders version, and everything is expected to "work", but without the insiders features (they're intended to be ignored). See: https://squidfunk.github.io/mkdocs-material/insiders/#compatibility. --- .github/workflows/ci.yaml | 6 +++++- .github/workflows/docs.yaml | 7 +++++-- docs/requirements-insiders.txt | 4 ++++ docs/requirements.txt | 6 +++--- 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 docs/requirements-insiders.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 54db12d04d..9346c527a5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -255,11 +255,15 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + - name: "Add SSH key" + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }} - name: "Install Rust toolchain" run: rustup show - uses: Swatinem/rust-cache@v2 - name: "Install dependencies" - run: pip install -r docs/requirements.txt + run: pip install -r docs/requirements-insiders.txt - name: "Update README File" run: python scripts/transform_readme.py --target mkdocs - name: "Generate docs" diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index cb8f646df5..27f3bacd7d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -13,12 +13,15 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + - name: "Add SSH key" + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }} - name: "Install Rust toolchain" run: rustup show - uses: Swatinem/rust-cache@v2 - name: "Install dependencies" - run: | - pip install -r docs/requirements.txt + run: pip install -r docs/requirements-insiders.txt - name: "Copy README File" run: | python scripts/transform_readme.py --target mkdocs diff --git a/docs/requirements-insiders.txt b/docs/requirements-insiders.txt new file mode 100644 index 0000000000..20e4c11ad7 --- /dev/null +++ b/docs/requirements-insiders.txt @@ -0,0 +1,4 @@ +PyYAML==6.0 +black==23.3.0 +mkdocs==1.4.3 +git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git diff --git a/docs/requirements.txt b/docs/requirements.txt index 647559a59e..db22a4e7cb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -mkdocs~=1.4.2 -mkdocs-material~=9.0.6 -PyYAML~=6.0 +PyYAML==6.0 black==23.3.0 +mkdocs==1.4.3 +mkdocs-material==9.1.18