GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Publish a demo to GitHub Pages from main (#23) · Gherkin/HTMLPCBViewer@be64f5e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • ci.yml
  • README.md
  • tests/fixtures
    • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+82Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,88 @@ jobs:
193193
done
194194
exit 1
195195
196+
# Full netdaq board for the demo, generated from the KiCad source. Same pin
197+
# as tests/fixtures/README.md. Runs on PRs too, so a break shows up before
198+
# main.
199+
demo-board:
200+
name: Demo board
201+
runs-on: ubuntu-latest
202+
container:
203+
image: kicad/kicad:10.0.6
204+
options: --user root
205+
steps:
206+
- uses: actions/checkout@v7
207+
208+
- uses: actions/checkout@v7
209+
with:
210+
repository: Gherkin/netdaq
211+
ref: e476a90996112e948fbc02550b53fd4876b7232d
212+
path: netdaq
213+
214+
- uses: actions/checkout@v7
215+
with:
216+
repository: openscopeproject/InteractiveHtmlBom
217+
ref: 5c192e794cd66fde04bab11810601b711bf8581b
218+
path: ibom
219+
220+
# pcbnew prints over a thousand assert warnings to stderr. Keep them out
221+
# of the log unless the run fails.
222+
- name: Generate board JSON
223+
env:
224+
IBOM_PATH: ${{ github.workspace }}/ibom
225+
run: |
226+
python3 tools/make_fixture.py netdaq/netdaq.kicad_pcb out/netdaq.json 2> make_fixture.log \
227+
|| { cat make_fixture.log; exit 1; }
228+
test -s out/netdaq.json
229+
230+
- uses: actions/upload-artifact@v7
231+
with:
232+
name: demo-board
233+
path: out/netdaq.json
234+
retention-days: 7
235+
236+
# Demo on GitHub Pages (#4): the self-contained viewer with the full netdaq
237+
# board inlined. Pages source must be set to "GitHub Actions".
238+
pages:
239+
name: Publish demo
240+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
241+
needs: [checks, smoke, build, browser, demo-board]
242+
runs-on: ubuntu-latest
243+
permissions:
244+
contents: read
245+
pages: write
246+
id-token: write
247+
concurrency:
248+
group: pages
249+
cancel-in-progress: false
250+
environment:
251+
name: github-pages
252+
url: ${{ steps.deploy.outputs.page_url }}
253+
steps:
254+
- uses: actions/checkout@v7
255+
256+
- uses: actions/setup-python@v7
257+
with:
258+
python-version: '3.12'
259+
260+
- uses: actions/download-artifact@v8
261+
with:
262+
name: demo-board
263+
path: board/
264+
265+
- name: Build demo page
266+
run: |
267+
mkdir -p site
268+
python generate.py board/netdaq.json -o site/index.html
269+
test -s site/index.html
270+
271+
- uses: actions/upload-pages-artifact@v5
272+
with:
273+
path: site/
274+
275+
- id: deploy
276+
uses: actions/deploy-pages@v5
277+
196278
# main pushes publish :latest, v* tags publish the version. Both get :sha-<short>.
197279
publish:
198280
name: Publish image
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ sides, keyboard shortcuts.
1212
Rendering runs in a Web Worker on an OffscreenCanvas, so pan and zoom stay
1313
smooth on large boards.
1414

15+
## Demo
16+
17+
https://gherkin.github.io/HTMLPCBViewer/
18+
19+
A single self-contained HTML file with the
20+
[Gherkin/netdaq](https://github.com/Gherkin/netdaq) board (CERN-OHL-P-2.0)
21+
inlined. On every push to `main`, CI exports the board from its KiCad source
22+
at the commit pinned in `tests/fixtures/README.md` and rebuilds the page.
23+
1524
## Requirements
1625

1726
- Allegro PCB Designer, for the export
Collapse file

‎tests/fixtures/README.md‎

Copy file name to clipboardExpand all lines: tests/fixtures/README.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ power planes. The smoke tests derive their expected counts from the fixture,
2424
so they do not need editing after a regenerate.
2525

2626
To move the pin, change the commit here and in the archive command, and
27-
regenerate.
27+
regenerate. The `demo-board` job in `.github/workflows/ci.yml` builds the
28+
full board for the Pages demo from the same pin; change it there too.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.