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
5 changes: 5 additions & 0 deletions .changeset/chat-demo-gallery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@link-assistant/react-chat-ui': minor
---

Add a React chat demo gallery with theme and language controls, a Doublets-compatible Unicode data store, browser-commander E2E coverage, and issue #1 case study documentation.
99 changes: 99 additions & 0 deletions .github/workflows/chat-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Chat demo pages

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: chat-demo-pages-${{ github.ref }}
cancel-in-progress: true

jobs:
build-test:
name: Build and test chat demos
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: '24.x'

- name: Install dependencies
run: npm install

- name: Install Chromium
run: npx playwright install --with-deps chromium

- name: Build demo pages
run: npm run demo:build

- name: Run browser-commander demo tests
run: npm run test:e2e

- name: Upload demo screenshot
uses: actions/upload-artifact@v7
with:
name: chat-demo-screenshot
path: docs/screenshots/issue-1-chat-demos.png

- name: Configure GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v6

- name: Upload GitHub Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v5
with:
path: dist/chat-demos

deploy:
name: Deploy chat demos
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build-test
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
outputs:
page_url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5

post-deploy-test:
name: Verify deployed chat demos
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: deploy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: '24.x'

- name: Install dependencies
run: npm install

- name: Install Chromium
run: npx playwright install --with-deps chromium

- name: Run browser-commander tests against GitHub Pages
env:
CHAT_DEMO_BASE_URL: ${{ needs.deploy.outputs.page_url }}
CHAT_DEMO_SCREENSHOT_PATH: docs/screenshots/issue-1-chat-demos-deployed.png
run: npm run test:e2e
3 changes: 3 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"**/*.min.js",
"**/coverage/**",
"**/.changeset/**",
"docs/case-studies/*/data/**",
"docs/chat-demos/public/**",
"docs/screenshots/**",
"**/package-lock.json",
"**/pnpm-lock.yaml",
"**/yarn.lock"
Expand Down
Loading
Loading