Skip to content

Merge pull request #274 from githubnext/fix/recompile-main-with-bundl… #99

Merge pull request #274 from githubnext/fix/recompile-main-with-bundl…

Merge pull request #274 from githubnext/fix/recompile-main-with-bundl… #99

Workflow file for this run

name: Deploy Playground to Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build Playground
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build library for browser
run: bun build ./src/index.ts --outdir ./playground/dist --target browser --minify
- name: Bundle TypeScript compiler for offline playground
run: cp node_modules/typescript/lib/typescript.js ./playground/dist/typescript.js
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: pip install pandas numpy
- name: Run benchmarks
run: bash benchmarks/run_benchmarks.sh
- name: Copy benchmark results to playground
run: |
mkdir -p ./playground/benchmarks
cp benchmarks/results.json ./playground/benchmarks/results.json
- name: Validate Python playground examples
run: python scripts/validate-python-examples.py playground/
- name: Setup Pages
uses: actions/configure-pages@v5
with:
enablement: true
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: playground/
deploy:
name: Deploy to 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