docs(readme): fix last stale language-count footnote (6+5 -> 7+8) #88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy cleverkeys.app | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'site/**' | |
| - 'web_demo/**' | |
| - 'docs/wiki/**' | |
| - 'README.md' | |
| - '.github/workflows/deploy-web-demo.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: site | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Ensure LFS files | |
| run: git lfs install && git lfs pull | |
| working-directory: . | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install site dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build Astro site | |
| run: bun run build | |
| env: | |
| ASTRO_TELEMETRY_DISABLED: '1' | |
| - name: Merge legacy demo & specs into dist | |
| working-directory: . | |
| run: | | |
| set -euo pipefail | |
| # /demo/ — ONNX-powered swipe demo. The HTML lives at | |
| # web_demo/demo/index.html and hits the same encoder/decoder | |
| # pair (swipe_encoder_android.onnx / swipe_decoder_android.onnx) | |
| # that the Android build ships inside the APK. | |
| if [ -d "web_demo/demo" ]; then | |
| mkdir -p site/dist/demo | |
| cp -r web_demo/demo/. site/dist/demo/ | |
| echo "✅ Copied web_demo/demo → site/dist/demo" | |
| fi | |
| # Supporting assets referenced by the demo (ONNX, tokenizer, vocab, JS, fonts) | |
| for pattern in '*.onnx' '*.js' '*.json' '*.css' '*.ttf' '*.woff' '*.woff2' '*.png' '*.jpg' '*.svg'; do | |
| cp -n web_demo/$pattern site/dist/demo/ 2>/dev/null || true | |
| done | |
| # /specs/ — Astro now renders specs from docs/wiki/specs/**/*.md | |
| # via the `specs` content collection. Static HTML files in | |
| # web_demo/specs/ remain as LEGACY fallbacks for URLs not yet | |
| # migrated to markdown (gesture-system.html, neural-prediction.html, | |
| # etc.). `cp -n` (no-clobber) ensures Astro-generated files like | |
| # /specs/index.html and /specs/typing/autocorrect-spec/index.html | |
| # take precedence over their legacy counterparts. | |
| if [ -d "web_demo/specs" ]; then | |
| mkdir -p site/dist/specs | |
| cp -rn web_demo/specs/. site/dist/specs/ || true | |
| echo "✅ Merged web_demo/specs into site/dist/specs (no-clobber)" | |
| fi | |
| # Backwards-compatible redirects for any old .html wiki URLs that | |
| # might be cached or linked externally. | |
| # The new wiki routes omit .html and lowercase path segments. | |
| if [ -d "web_demo/wiki" ]; then | |
| find web_demo/wiki -type f -name "*.html" | while read f; do | |
| rel="${f#web_demo/wiki/}" | |
| # /wiki/foo/bar.html -> /wiki/foo/bar/ | |
| slug="${rel%.html}" | |
| slug_lower="$(echo "$slug" | tr '[:upper:]' '[:lower:]')" | |
| target="/wiki/${slug_lower}/" | |
| # Skip if a file with this exact path already exists in dist | |
| if [ -f "site/dist/wiki/${rel}" ]; then | |
| continue | |
| fi | |
| mkdir -p "site/dist/wiki/$(dirname "$rel")" | |
| cat > "site/dist/wiki/${rel}" <<EOF | |
| <!doctype html><meta charset="utf-8"> | |
| <title>Redirecting…</title> | |
| <link rel="canonical" href="${target}"> | |
| <meta http-equiv="refresh" content="0;url=${target}"> | |
| <p>Redirecting to <a href="${target}">${target}</a>.</p> | |
| EOF | |
| done | |
| fi | |
| # CNAME lives in site/public/ and is copied automatically by Astro, | |
| # but we reassert it here so the deploy artifact always has it. | |
| echo "cleverkeys.app" > site/dist/CNAME | |
| echo "---" | |
| echo "📊 Deploy tree:" | |
| find site/dist -maxdepth 2 -type d | sort | |
| echo "---" | |
| echo "📦 Total size: $(du -sh site/dist | cut -f1)" | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site/dist | |
| 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 |