From 2e8d04933aa373b8742f0f5eb3b69d86e4f59841 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 10 Nov 2025 04:54:45 +0000 Subject: [PATCH] CI: Fix documentation redirect for "https://swiftwasm.org/JavaScriptKit" --- .github/workflows/test.yml | 3 ++- .gitignore | 1 + Utilities/prepare-gh-pages.sh | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 Utilities/prepare-gh-pages.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a07d7391..5df11d0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,11 +123,12 @@ jobs: env: SWIFT_SDK_ID_wasm32_unknown_wasip1_threads: ${{ steps.setup-wasm32-unknown-wasip1-threads.outputs.swift-sdk-id }} SWIFT_SDK_ID_wasm32_unknown_wasip1: ${{ steps.setup-wasm32-unknown-wasip1.outputs.swift-sdk-id }} + - run: ./Utilities/prepare-gh-pages.sh - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v4 with: - path: Examples/ + path: ./_site deploy-examples: runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/.gitignore b/.gitignore index a62100fd..8dba0727 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ Package.resolved Plugins/BridgeJS/Sources/JavaScript/package-lock.json Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/**/*.actual bridge-js.config.local.json +_site/ diff --git a/Utilities/prepare-gh-pages.sh b/Utilities/prepare-gh-pages.sh new file mode 100755 index 00000000..7260717a --- /dev/null +++ b/Utilities/prepare-gh-pages.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +mkdir -p ./_site +# Copy all files from ./Examples to ./_site, excluding specified path patterns +rsync -av --progress ./Examples/ ./_site/ --exclude=".build" +cat < _site/index.html + + + + + Redirecting... + + +

If you are not redirected automatically, follow this link to JavaScriptKit documentation.

+ + +EOF +