From 1759d4b6c244b0ac626a54c236f23f065b0d8fcc Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 18 Oct 2026 22:42:02 +0200 Subject: [PATCH] The publish step wrote the site one level too deep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The built site went to gh-pages at docs//, but this repository is already served at /docs/ — so it landed at /docs/docs// while /docs/latest/ went on serving the MkDocs build mike had left there. Both URLs answered 200, which is why the green deploy said nothing. The publish step now calls go-fleettools/fleettools/cmd/pagespublish at a pinned tag: the version replaces // at the ROOT and nothing else, then versions.json in mike's format (what the Hextra fork's version selector reads), the latest link and the root redirect. It also removes the misplaced docs/ directory once, and only when that directory holds nothing but version directories. One block replaced verbatim, by a tool that refuses a file which does not hold it exactly; the pages are untouched. Co-Authored-By: Claude Opus 5 --- .github/workflows/docs.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 86667c3..7519a0b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -130,21 +130,24 @@ jobs: name: site path: site - # Only the version being built is replaced; every other version stays as - # it is, and /docs/latest/ follows the newest. + - uses: actions/setup-go@v6 + with: + go-version: '1.27.2' + + # ⛔ THE VERSION GOES AT THE BRANCH ROOT. This step used to write + # docs// — but a project repository named "docs" is ALREADY + # served at /docs/, so the site landed at /docs/docs// while + # /docs/latest/ went on serving the MkDocs build mike had left there. + # Both URLs answered 200, which is why the green deploy said nothing. + # + # pagespublish replaces that version and nothing else, writes + # versions.json in mike's format (what the Hextra fork's version selector + # reads), points latest at the newest release, leaves the root + # redirecting to it, and removes the misplaced docs/ directory once. - name: Publish ${{ needs.build.outputs.version }} - working-directory: gh-pages - run: | - version="${{ needs.build.outputs.version }}" - rm -rf "docs/${version}" - mkdir -p "docs/${version}" - cp -R ../site/. "docs/${version}/" - newest=$(ls docs | grep -E '^[0-9]+\.[0-9]+$' | sort -t. -k1,1n -k2,2n | tail -1 || true) - if [ -n "${newest}" ]; then - rm -rf docs/latest - cp -R "docs/${newest}" docs/latest - fi - touch .nojekyll + run: >- + go run github.com/go-fleettools/fleettools/cmd/pagespublish@v0.26.0 + "${{ needs.build.outputs.version }}" site gh-pages - name: Push gh-pages working-directory: gh-pages