Skip to content

Commit f14f02f

Browse files
committed
Yep. This does not work on the web! So here I'm trying to workaround this.
1 parent 43c1794 commit f14f02f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/build-gh-pages.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ name: CI
66
on:
77
# Triggers the workflow on push or pull request events but only for the "master" branch
88
push:
9-
branches: [ "master" ]
9+
branches: ["master"]
1010

11-
# Allows you to run this workflow manually from the Actions tab
11+
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

1414
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
@@ -27,19 +27,24 @@ jobs:
2727
fetch-tags: true
2828

2929
# Runs a single command using the runners shell
30-
- name: Run a one-line script
30+
- name: Build and pack gh-pages
3131
run: |
3232
npm ci
3333
npx npm-run-all buildcss:* build:*
34-
mkdir ./dist/gh-pages
35-
mv ./dist/chatstatcreator.html ./dist/gh-pages/index.html
34+
mkdir -p ./dist/gh-pages/dist/chatstat
35+
mkdir -p ./dist/gh-pages/dist/chatstatworker
36+
mkdir -p ./dist/gh-pages/src/packer
37+
mv ./index.html ./dist/gh-pages/
38+
mv ./dist/chatstatcreator/chatstatcreator.iife.js ./dist/gh-pages/src/packer/main.js
39+
mv ./dist/chatstat/chatstat.iife.js ./dist/gh-pages/dist/chatstat/
40+
mv ./dist/chatstatworker/chatstat.worker.iife.js ./dist/gh-pages/dist/chatstatworker/
3641
3742
- name: Upload GitHub Pages artifact
3843
uses: actions/[email protected]
3944
with:
4045
# Artifact name
4146
path: ./dist/gh-pages/ # default is _site/
42-
47+
4348
# Deployment job
4449
deploy:
4550
environment:

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</head>
88
<body>
99
<main id="app"></main>
10-
<script type="module" src="/src/packer/main.js"></script>
10+
<script type="module" src="src/packer/main.js"></script>
1111
</body>
1212
</html>

0 commit comments

Comments
 (0)