Skip to content

Merge pull request #1 from iacchus/floating-keyboard-mode-49343986751… #1

Merge pull request #1 from iacchus/floating-keyboard-mode-49343986751…

Merge pull request #1 from iacchus/floating-keyboard-mode-49343986751… #1

name: Deploy CleverKeys Web Demo
on:
push:
branches: [ main ]
paths: [ 'web_demo/**', 'README.md', 'docs/wiki/**' ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Ensure LFS files
run: git lfs install && git lfs pull
- name: Prepare CleverKeys website and demo
run: |
mkdir -p deploy/demo
mkdir -p deploy/specs
if [ -d "web_demo" ]; then
echo "📁 Setting up CleverKeys website..."
# Copy new homepage
if [ -f "web_demo/index.html" ]; then
cp web_demo/index.html deploy/
echo "✅ Homepage ready"
fi
# Copy demo page (use demo/index.html if exists, otherwise under construction)
echo "📁 Setting up demo in /demo/..."
if [ -f "web_demo/demo/index.html" ]; then
cp web_demo/demo/index.html deploy/demo/index.html
echo "✅ Demo page ready (under construction)"
elif [ -f "web_demo/swipe-onnx.html" ]; then
cp web_demo/swipe-onnx.html deploy/demo/index.html
echo "✅ Demo page ready (neural swipe)"
fi
# Copy specs documentation
echo "📁 Setting up specs documentation in /specs/..."
if [ -d "web_demo/specs" ]; then
cp -r web_demo/specs/* deploy/specs/
echo "✅ Specs documentation ready"
fi
# Copy wiki user guide
echo "📁 Setting up wiki user guide in /wiki/..."
if [ -d "web_demo/wiki" ]; then
mkdir -p deploy/wiki
cp -r web_demo/wiki/* deploy/wiki/
echo "✅ Wiki user guide ready (includes search-index.json)"
fi
# Copy demo supporting files (for when demo is restored)
echo "📁 Copying demo assets..."
cp web_demo/*.onnx deploy/demo/ 2>/dev/null || echo "ℹ️ No ONNX models"
cp web_demo/*.js deploy/demo/ 2>/dev/null || echo "ℹ️ No JS files"
cp web_demo/*.json deploy/demo/ 2>/dev/null || echo "ℹ️ No JSON config files"
cp web_demo/*.css deploy/demo/ 2>/dev/null || echo "ℹ️ No CSS files"
# Copy any font files
cp web_demo/*.ttf deploy/demo/ 2>/dev/null || echo "ℹ️ No TTF fonts"
cp web_demo/*.woff deploy/demo/ 2>/dev/null || echo "ℹ️ No WOFF fonts"
cp web_demo/*.woff2 deploy/demo/ 2>/dev/null || echo "ℹ️ No WOFF2 fonts"
# Copy any image files
cp web_demo/*.png deploy/demo/ 2>/dev/null || echo "ℹ️ No PNG images"
cp web_demo/*.jpg deploy/demo/ 2>/dev/null || echo "ℹ️ No JPG images"
cp web_demo/*.svg deploy/demo/ 2>/dev/null || echo "ℹ️ No SVG images"
fi
echo ""
echo "✅ Website structure prepared:"
echo " / - Homepage"
echo " /demo/ - Demo (under construction)"
echo " /specs/ - Technical specifications"
echo " /wiki/ - User guide wiki (with search-index.json)"
echo ""
echo "📊 Deployed files:"
ls -laR deploy/
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./deploy
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4