From f50e9994956bd046ccf8f184f3ee3c206555858c Mon Sep 17 00:00:00 2001 From: rocktimsaikia Date: Wed, 27 May 2026 20:00:52 +0530 Subject: [PATCH] ci: serve Pages demo at the site root instead of /examples/ --- .github/workflows/pages.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 80c9bc4..632d3be 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -36,14 +36,13 @@ jobs: - name: Build bundle run: npm run build - # Assemble the published site: the demo at /examples/ keeps its relative - # `../dist/index.js` reference, and the root redirects to it. + # Assemble the published site: serve the demo at the site root, rewriting + # its relative `../dist/index.js` reference to `./dist/index.js`. - name: Assemble site run: | - mkdir -p _site/examples _site/dist - cp examples/index.html _site/examples/index.html + mkdir -p _site/dist cp dist/index.js _site/dist/index.js - printf '\n' > _site/index.html + sed 's#\.\./dist/index.js#./dist/index.js#' examples/index.html > _site/index.html - name: Configure Pages uses: actions/configure-pages@v5