Skip to content

Commit 39d358f

Browse files
ci: serve Pages demo at the site root instead of /examples/ (#18)
1 parent e61dee7 commit 39d358f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/pages.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ jobs:
3636
- name: Build bundle
3737
run: npm run build
3838

39-
# Assemble the published site: the demo at /examples/ keeps its relative
40-
# `../dist/index.js` reference, and the root redirects to it.
39+
# Assemble the published site: serve the demo at the site root, rewriting
40+
# its relative `../dist/index.js` reference to `./dist/index.js`.
4141
- name: Assemble site
4242
run: |
43-
mkdir -p _site/examples _site/dist
44-
cp examples/index.html _site/examples/index.html
43+
mkdir -p _site/dist
4544
cp dist/index.js _site/dist/index.js
46-
printf '<!doctype html><meta http-equiv="refresh" content="0; url=./examples/">\n' > _site/index.html
45+
sed 's#\.\./dist/index.js#./dist/index.js#' examples/index.html > _site/index.html
4746
4847
- name: Configure Pages
4948
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)