Skip to content

Commit 3ef573e

Browse files
author
John Gribbin
committed
Deploy web/ to GitHub Pages; point hosted visitors at self-hosting
The Pages workflow uploads web/ with no build step, so the served files are auditable against the repo tree at the deployed commit. The footer now tells visitors of any hosted copy to clone and serve locally.
1 parent 933e584 commit 3ef573e

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Deploys web/ to GitHub Pages, unmodified — no build step, so the served
2+
# files are byte-identical to the repo tree at the deployed commit and can
3+
# be audited against it (see TRUST.md).
4+
name: Deploy webapp to GitHub Pages
5+
6+
on:
7+
push:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
deploy:
22+
runs-on: ubuntu-latest
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/configure-pages@v5
29+
with:
30+
enablement: true
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: web
34+
- id: deployment
35+
uses: actions/deploy-pages@v4

web/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,11 @@ <h2>Verify the sources yourself</h2>
172172
</table>
173173
</section>
174174

175-
<footer>Serve this directory locally to open the page: <code>python3 -m http.server</code> in <code>web/</code>, then
176-
visit <code>http://localhost:8000</code>. Browsers cannot load the WebAssembly runtime from <code>file://</code>.
175+
<footer>Viewing a hosted copy of this page? Don't trust it — clone
176+
<a href="https://github.com/johngribbin/dice-rolls">the repo</a>, audit it, and serve it yourself, offline:
177+
<code>python3 -m http.server</code> in <code>web/</code>, then visit <code>http://localhost:8000</code>
178+
(browsers cannot load the WebAssembly runtime from <code>file://</code>). The GitHub Pages deploy is built from
179+
the repo with no build step, so its files can be audited against the tree at the deployed commit.
177180
BitBox02/Jade use a paper lookup table — no comparable algorithm.</footer>
178181
</main>
179182

0 commit comments

Comments
 (0)