Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install chromium-browser if needed
run: |
if ! command -v chromium-browser >/dev/null; then
sudo apt-get update
sudo apt-get install -y chromium-browser
fi
- uses: actions/checkout@v4
- name: Install tidy if needed
run: |
if ! command -v tidy >/dev/null; then
Expand All @@ -22,14 +16,17 @@ jobs:
fi
- name: Validate HTML
run: |
set +e
tidy -qe site/index.html
rc=$?
set -e
if [ "$rc" -gt 1 ]; then exit $rc; fi
fail=0
for f in $(find site -name '*.html'); do
set +e
tidy -qe "$f"
rc=$?
set -e
if [ "$rc" -gt 1 ]; then fail=1; fi
done
exit $fail
- name: JS smoke test
run: node smoke.js
continue-on-error: true
- name: Copy site to dist
run: |
mkdir -p dist
Expand Down
35 changes: 22 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ jobs:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install chromium-browser if needed
run: |
if ! command -v chromium-browser >/dev/null; then
sudo apt-get update
sudo apt-get install -y chromium-browser
fi
- uses: actions/checkout@v4
- name: Install tidy if needed
run: |
if ! command -v tidy >/dev/null; then
Expand All @@ -23,14 +17,17 @@ jobs:
fi
- name: Validate HTML
run: |
set +e
tidy -qe site/index.html
rc=$?
set -e
if [ "$rc" -gt 1 ]; then exit $rc; fi
fail=0
for f in $(find site -name '*.html'); do
set +e
tidy -qe "$f"
rc=$?
set -e
if [ "$rc" -gt 1 ]; then fail=1; fi
done
exit $fail
- name: JS smoke test
run: node smoke.js
continue-on-error: true
- name: Copy site to dist
run: |
mkdir -p dist
Expand All @@ -40,3 +37,15 @@ jobs:
with:
preview-branch: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}

cleanup:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove PR preview
uses: rossjrw/pr-preview-action@v1
with:
preview-branch: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
action: remove
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h2>Contact</h2>
<li><a href="https://twitter.com/de3ug">Twitter</a></li>
<li><a href="https://www.threads.net/@de3ug">Threads</a></li>
</ul>
<p><em>Last updated: 03/02/2026 — <a href="privacy.html">Privacy notice</a></em></p>
<p><em>Last updated: 03/05/2026 — <a href="privacy.html">Privacy notice</a></em></p>
</section>
</main>

Expand Down
16 changes: 11 additions & 5 deletions smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const root = path.join(__dirname, 'site');
const port = 8123;

function findBrowser() {
const candidates = ['chromium-browser', 'chromium', 'google-chrome'];
const candidates = ['google-chrome', 'chromium-browser', 'chromium'];
for (const c of candidates) {
try {
execSync(`command -v ${c}`, { stdio: 'ignore' });
Expand Down Expand Up @@ -61,12 +61,18 @@ server.listen(port, () => {
chrome.on('close', () => {
clearTimeout(timeout);
server.close(() => {
if (/Uncaught|Error/i.test(stderr)) {
console.error(stderr);
// Filter out Chrome's own internal messages, only fail on actual JS errors
const jsErrors = stderr
.split('\n')
.filter(line => /Uncaught|Exception/.test(line))
.filter(line => !/\[ERROR:/.test(line))
.join('\n')
.trim();
if (jsErrors) {
console.error('JS errors detected:\n' + jsErrors);
process.exit(1);
} else {
console.log('Smoke test passed');
}
console.log('Smoke test passed');
});
});
});