Skip to content

Commit fbb39b3

Browse files
committed
demo: revamp landing UX and add production smoke monitoring
1 parent 600c444 commit fbb39b3

21 files changed

+925
-241
lines changed

.github/workflows/monitor-demo.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Monitor Demo Site
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 * * * *'
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- demo/**
12+
- render.yaml
13+
- scripts/check-demo-site.sh
14+
- .github/workflows/monitor-demo.yml
15+
16+
permissions:
17+
contents: read
18+
issues: write
19+
20+
jobs:
21+
smoke-check:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Wait for deploy propagation
29+
if: github.event_name == 'push'
30+
run: sleep 240
31+
32+
- name: Run production smoke check
33+
run: bash scripts/check-demo-site.sh
34+
35+
- name: Create or update incident issue
36+
if: failure()
37+
uses: actions/github-script@v7
38+
with:
39+
script: |
40+
const title = 'Demo site smoke check failing';
41+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
42+
const body = [
43+
'Automated smoke check failed.',
44+
'',
45+
`- Workflow run: ${runUrl}`,
46+
`- Event: ${context.eventName}`,
47+
`- SHA: ${context.sha}`,
48+
`- UTC: ${new Date().toISOString()}`,
49+
'',
50+
'Please inspect the Render deploy status and logs.'
51+
].join('\n');
52+
53+
const { data: issues } = await github.rest.issues.listForRepo({
54+
owner: context.repo.owner,
55+
repo: context.repo.repo,
56+
state: 'open',
57+
per_page: 100,
58+
});
59+
60+
const existing = issues.find((issue) => issue.title === title);
61+
if (existing) {
62+
await github.rest.issues.createComment({
63+
owner: context.repo.owner,
64+
repo: context.repo.repo,
65+
issue_number: existing.number,
66+
body,
67+
});
68+
return;
69+
}
70+
71+
await github.rest.issues.create({
72+
owner: context.repo.owner,
73+
repo: context.repo.repo,
74+
title,
75+
body,
76+
});

demo/index.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>react-form-persist Demo</title>
6+
<title>react-form-autosave Demo Playground</title>
7+
<meta
8+
name="description"
9+
content="Interactive demos and documentation for react-form-autosave, a React form persistence library with autosave, undo/redo, tab sync, migrations, and GDPR controls."
10+
/>
11+
<meta property="og:title" content="react-form-autosave Demo Playground" />
12+
<meta
13+
property="og:description"
14+
content="Try interactive demos for autosave, tab sync, undo/redo, migration, expiration, and GDPR-safe persistence."
15+
/>
16+
<meta property="og:type" content="website" />
17+
<meta property="og:url" content="https://react-form-autosave.onrender.com" />
718
<style>
819
* {
920
box-sizing: border-box;

0 commit comments

Comments
 (0)