From 9fa73276fc97ab4ca3b0c4ebebd5eade3002fc86 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 11:18:34 -0500 Subject: [PATCH 01/10] Use actions/setup-python in publish-docs instead of managing a virtualenv directly which hopefully resolves the problem with mkdocs not finding its extensions --- .github/workflows/publish-docs.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f9d680117e..1d5e1668fc 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -34,13 +34,13 @@ jobs: - run: make gfmrun env: - FLAGS: --walk docs/v3/ + FLAGS: --walk docs/v3/ - run: make diffcheck publish: permissions: - contents: write + contents: write if: startswith(github.ref, 'refs/tags/') name: publish needs: [test-docs] @@ -50,21 +50,20 @@ jobs: with: fetch-depth: 0 - - name: Create virtual environment - run: | - python -m venv venv + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: pip - - run: | - . venv/bin/activate - make ensure-mkdocs + - name: Ensure mkdocs is available + run: make ensure-mkdocs env: FLAGS: --upgrade-pip - - run: make set-mkdocs-remote + - name: Set mkdocs remote + run: make set-mkdocs-remote env: MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: | - . venv/bin/activate - make deploy-mkdocs - \ No newline at end of file + - name: Deploy via mkdocs + run: make deploy-mkdocs From 499d63d951d19fc6d6644358444baee566dc4700 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 11:20:38 -0500 Subject: [PATCH 02/10] TEMPORARY publish docs from this branch --- .github/workflows/publish-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 1d5e1668fc..905d6132f0 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - publish-docs-python-shuffle tags: - v3.* @@ -41,7 +42,7 @@ jobs: publish: permissions: contents: write - if: startswith(github.ref, 'refs/tags/') + #if: startswith(github.ref, 'refs/tags/') name: publish needs: [test-docs] runs-on: ubuntu-latest From ee46b972c3ff12b03886a0bf646fc98d1adcba5f Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 11:47:16 -0500 Subject: [PATCH 03/10] Point setup-python workflow step at mkdocs-reqs.txt --- .github/workflows/publish-docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 905d6132f0..245fae18e4 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -55,6 +55,7 @@ jobs: with: python-version: '3.13' cache: pip + cache-dependency-path: mkdocs-reqs.txt - name: Ensure mkdocs is available run: make ensure-mkdocs From c8d5a9c78bf1e4fe808b2d17843e55ddd0201032 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 11:52:04 -0500 Subject: [PATCH 04/10] Run mkdocs command directly to see if that's the problem --- .github/workflows/publish-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 245fae18e4..80bcc5d283 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -68,4 +68,5 @@ jobs: MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy via mkdocs - run: make deploy-mkdocs + #run: make deploy-mkdocs + run: mkdocs gh-deploy --force From 8ed632512e86d006273b8909d0a83426807a4e24 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 11:58:27 -0500 Subject: [PATCH 05/10] Run everything mkdocs directly --- .github/workflows/publish-docs.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 80bcc5d283..9719ca61f2 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -58,14 +58,18 @@ jobs: cache-dependency-path: mkdocs-reqs.txt - name: Ensure mkdocs is available - run: make ensure-mkdocs - env: - FLAGS: --upgrade-pip + #run: make ensure-mkdocs + #env: + # FLAGS: --upgrade-pip + run: pip install -r mkdocs-reqs.txt - name: Set mkdocs remote - run: make set-mkdocs-remote - env: - MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + #run: make set-mkdocs-remote + #env: + # MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git remote rm origin + git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/urfave/cli.git" - name: Deploy via mkdocs #run: make deploy-mkdocs From c6c87e4f152d79740b5b4f88735fe02aa68a100a Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 12:05:21 -0500 Subject: [PATCH 06/10] Bump mkdocs-material and show frozen deps --- .github/workflows/publish-docs.yml | 4 +++- mkdocs-reqs.txt | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 9719ca61f2..ea496a3557 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -61,7 +61,9 @@ jobs: #run: make ensure-mkdocs #env: # FLAGS: --upgrade-pip - run: pip install -r mkdocs-reqs.txt + run: | + pip install -r mkdocs-reqs.txt + pip freeze - name: Set mkdocs remote #run: make set-mkdocs-remote diff --git a/mkdocs-reqs.txt b/mkdocs-reqs.txt index 7043b5592f..47d83532f0 100644 --- a/mkdocs-reqs.txt +++ b/mkdocs-reqs.txt @@ -1,5 +1,4 @@ mkdocs-git-revision-date-localized-plugin~=1.2 -mkdocs-material-extensions~=1.3 -mkdocs-material~=8.5 +mkdocs-material~=9.5 mkdocs~=1.6 pygments~=2.18 From ac4fa168cda4b2648d177b0096c38c8cc67b8354 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 12:08:55 -0500 Subject: [PATCH 07/10] Why is mkdocs so confuse --- .github/workflows/publish-docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index ea496a3557..339edc556c 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -75,4 +75,6 @@ jobs: - name: Deploy via mkdocs #run: make deploy-mkdocs - run: mkdocs gh-deploy --force + run: | + which mkdocs + mkdocs gh-deploy --force From 3a2488a82a5d092a7d02bbf2c1f3b0a2e7c3a5f2 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 12:12:13 -0500 Subject: [PATCH 08/10] Once more with feeling --- .github/workflows/publish-docs.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 339edc556c..d77c348abc 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -58,23 +58,16 @@ jobs: cache-dependency-path: mkdocs-reqs.txt - name: Ensure mkdocs is available - #run: make ensure-mkdocs - #env: - # FLAGS: --upgrade-pip run: | pip install -r mkdocs-reqs.txt pip freeze - name: Set mkdocs remote - #run: make set-mkdocs-remote - #env: - # MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git remote rm origin git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/urfave/cli.git" - name: Deploy via mkdocs - #run: make deploy-mkdocs run: | which mkdocs mkdocs gh-deploy --force From 0b7af7b2bccf38f96ff8c0d8cc328a86418766f7 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 12:16:54 -0500 Subject: [PATCH 09/10] Switch back to make targets --- .github/workflows/publish-docs.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index d77c348abc..392a88aaf7 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -58,16 +58,12 @@ jobs: cache-dependency-path: mkdocs-reqs.txt - name: Ensure mkdocs is available - run: | - pip install -r mkdocs-reqs.txt - pip freeze + run: make ensure-mkdocs - name: Set mkdocs remote - run: | - git remote rm origin - git remote add origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/urfave/cli.git" + run: make set-mkdocs-remote + env: + MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy via mkdocs - run: | - which mkdocs - mkdocs gh-deploy --force + run: make deploy-mkdocs From 0498828c56ce0848eac9384a1692f5d22a34db21 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Nov 2024 12:18:47 -0500 Subject: [PATCH 10/10] Remove temporary branch and tag condition overrides --- .github/workflows/publish-docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 392a88aaf7..8d2d97586e 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - publish-docs-python-shuffle tags: - v3.* @@ -42,7 +41,7 @@ jobs: publish: permissions: contents: write - #if: startswith(github.ref, 'refs/tags/') + if: startswith(github.ref, 'refs/tags/') name: publish needs: [test-docs] runs-on: ubuntu-latest