diff --git a/.github/workflows/tiny-docs.yml b/.github/workflows/tiny-docs.yml index cbaadf7..07d74bf 100644 --- a/.github/workflows/tiny-docs.yml +++ b/.github/workflows/tiny-docs.yml @@ -71,24 +71,20 @@ jobs: - name: Create docs/config.json if missing shell: bash run: | - set -euo pipefail - mkdir -p docs - if [ ! -f docs/config.json ]; then - SITE='${{ steps.derive.outputs.site }}' - BASE='${{ steps.derive.outputs.base }}' - NAME='${{ steps.derive.outputs.name }}' + set -euo pipefail + mkdir -p docs + if [ ! -f docs/config.json ]; then + SITE='${{ steps.derive.outputs.site }}' + BASE='${{ steps.derive.outputs.base }}' + NAME='${{ steps.derive.outputs.name }}' + + printf '{\n "SITE": "%s",\n "BASE": "%s",\n "SITE_NAME": "%s"\n}\n' \ + "$SITE" "$BASE" "$NAME" > docs/config.json - if command -v jq >/dev/null 2>&1; then - jq -n --arg site "$SITE" --arg base "$BASE" --arg name "$NAME" \ - '{site:$site, base:$base, name:$name}' > docs/config.json - else - printf '{\n "site": "%s",\n "base": "%s",\n "name": "%s"\n}\n' \ - "$SITE" "$BASE" "$NAME" > docs/config.json - fi - echo "Created docs/config.json, site=$SITE, base=$BASE, name=$NAME" - else - echo "docs/config.json already exists; leaving it unchanged." - fi + echo "Created docs/config.json, site=$SITE, base=$BASE, name=$NAME" + else + echo "docs/config.json already exists; leaving it unchanged." + fi - name: Install, build, and upload the site artifact uses: withastro/action@v3 -- knotmirror 0.0.1 From 1648d5f05a59940c102e486ae7e7cf501a728fc5 Mon Sep 17 00:00:00 2001 From: Florian <45694132+flo-bit@users.noreply.github.com> Date: Sun, 26 Oct 2025 21:49:13 +0100 Subject: [PATCH 2/3] fix 420 --- .github/workflows/tiny-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tiny-docs.yml b/.github/workflows/tiny-docs.yml index 07d74bf..0a6a3db 100644 --- a/.github/workflows/tiny-docs.yml +++ b/.github/workflows/tiny-docs.yml @@ -78,7 +78,7 @@ jobs: BASE='${{ steps.derive.outputs.base }}' NAME='${{ steps.derive.outputs.name }}' - printf '{\n "SITE": "%s",\n "BASE": "%s",\n "SITE_NAME": "%s"\n}\n' \ + printf '{\n "SITE": "%s",\n "BASE": "/%s",\n "SITE_NAME": "%s"\n}\n' \ "$SITE" "$BASE" "$NAME" > docs/config.json echo "Created docs/config.json, site=$SITE, base=$BASE, name=$NAME" -- knotmirror 0.0.1 From 8fd68ae35e5d23c66a9ee2e48ff0b4db3041e573 Mon Sep 17 00:00:00 2001 From: Florian <45694132+flo-bit@users.noreply.github.com> Date: Sun, 26 Oct 2025 21:50:20 +0100 Subject: [PATCH 3/3] fix 422 --- .github/workflows/tiny-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tiny-docs.yml b/.github/workflows/tiny-docs.yml index 0a6a3db..95874ea 100644 --- a/.github/workflows/tiny-docs.yml +++ b/.github/workflows/tiny-docs.yml @@ -9,7 +9,7 @@ on: type: string default: flo-bit/tiny-docs site: - description: "Docs site domain (default: .github.io)" + description: "Docs site domain (default: https://.github.io)" required: false type: string base: @@ -52,7 +52,7 @@ jobs: OWNER="${GITHUB_REPOSITORY%/*}" REPO="${GITHUB_REPOSITORY#*/}" - SITE_DEFAULT="${OWNER}.github.io" + SITE_DEFAULT="https://${OWNER}.github.io" BASE_DEFAULT="/${REPO}" NAME_DEFAULT="${REPO}"