Skip to content

fix(routes): register autocomplete route in routes config #25

fix(routes): register autocomplete route in routes config

fix(routes): register autocomplete route in routes config #25

name: Deploy Examples to GitHub Pages
on:
push:
branches: [main]
paths:
- 'examples/react/**'
- 'src/**'
- '.github/workflows/deploy-examples.yml'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
name: Build Example App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install SDK dependencies
run: bun install --frozen-lockfile
working-directory: .
- name: Build SDK
run: bun run build
working-directory: .
- name: Generate API docs JSON
run: bun run docs:json
working-directory: .
- name: Install example dependencies
run: bun install --frozen-lockfile
working-directory: examples/react
- name: Build example app
run: bun run build
working-directory: examples/react
env:
NODE_ENV: production
VITE_PUBLIC_POSTHOG_KEY: ${{ secrets.VITE_PUBLIC_POSTHOG_KEY }}
VITE_PUBLIC_POSTHOG_HOST: ${{ secrets.VITE_PUBLIC_POSTHOG_HOST }}
- name: Prepare deployment directory
run: |
mkdir -p _site
cp -r examples/react/build/client/* _site/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
name: Deploy to GitHub Pages
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