Skip to content

Commit 93ba606

Browse files
committed
old action
1 parent d4e8e53 commit 93ba606

File tree

4 files changed

+686
-2
lines changed

4 files changed

+686
-2
lines changed

.github/workflows/continuous_deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: moonrepo/setup-rust@v0
13-
12+
# - uses: moonrepo/setup-rust@v0
13+
- uses: actions-rs/toolchain@v1
1414
- uses: jetli/trunk-action@v0.4.0
1515
- uses: jetli/wasm-bindgen-action@v0.2.0
1616
- uses: actions/checkout@v3

dist/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html><html lang="en"><head>
2+
<link rel="preload" href="/isotope-plotter-2691a09ade8aec0b_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
3+
<link rel="modulepreload" href="/isotope-plotter-2691a09ade8aec0b.js"></head>
4+
<body>
5+
<script type="module">import init from '/isotope-plotter-2691a09ade8aec0b.js';init('/isotope-plotter-2691a09ade8aec0b_bg.wasm');</script><script>(function () {
6+
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
7+
var url = protocol + '//' + window.location.host + '/_trunk/ws';
8+
var poll_interval = 5000;
9+
var reload_upon_connect = () => {
10+
window.setTimeout(
11+
() => {
12+
// when we successfully reconnect, we'll force a
13+
// reload (since we presumably lost connection to
14+
// trunk due to it being killed, so it will have
15+
// rebuilt on restart)
16+
var ws = new WebSocket(url);
17+
ws.onopen = () => window.location.reload();
18+
ws.onclose = reload_upon_connect;
19+
},
20+
poll_interval);
21+
};
22+
23+
var ws = new WebSocket(url);
24+
ws.onmessage = (ev) => {
25+
const msg = JSON.parse(ev.data);
26+
if (msg.reload) {
27+
window.location.reload();
28+
}
29+
};
30+
ws.onclose = reload_upon_connect;
31+
})()
32+
</script></body></html>

0 commit comments

Comments
 (0)