From 737b766a1f04590c521a9920a26d4dc0fbed1d43 Mon Sep 17 00:00:00 2001 From: moilanik Date: Sat, 13 Jun 2026 05:40:15 +0300 Subject: [PATCH] =?UTF-8?q?korjattu=20raporointia=20ja=20sen=20linkkej?= =?UTF-8?q?=C3=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-feature.yml | 5 ----- scripts/publish-git-pages.sh | 10 ++++++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-feature.yml b/.gitea/workflows/build-feature.yml index 4aab0c4..bf707c5 100644 --- a/.gitea/workflows/build-feature.yml +++ b/.gitea/workflows/build-feature.yml @@ -145,11 +145,6 @@ jobs: echo "" } > "reports/${SHA8}/index.html" - - name: Publish report index - shell: bash - run: | - bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}" - - name: Set build commit status run: | bash .ci/scripts/report-status.sh success \ diff --git a/scripts/publish-git-pages.sh b/scripts/publish-git-pages.sh index e6c3456..61065ab 100755 --- a/scripts/publish-git-pages.sh +++ b/scripts/publish-git-pages.sh @@ -29,8 +29,14 @@ WORK=$(mktemp -d) TAR=$(mktemp) trap 'rm -rf "$WORK" "$TAR"' EXIT -mkdir -p "$WORK/${OWNER}/${REPO}/reports/${SHA8}" -cp -a "$REPORT_DIR/." "$WORK/${OWNER}/${REPO}/reports/${SHA8}/" +RELPATH="${REPORT_DIR#reports/${SHA8}/}" +if [ "$RELPATH" != "$REPORT_DIR" ] && [ -n "$RELPATH" ]; then + TARGET="$WORK/${OWNER}/${REPO}/reports/${SHA8}/${RELPATH}" +else + TARGET="$WORK/${OWNER}/${REPO}/reports/${SHA8}" +fi +mkdir -p "$TARGET" +cp -a "$REPORT_DIR/." "$TARGET/" cat > "$WORK/${OWNER}/${REPO}/reports/${SHA8}/.meta" <