Skip to content

fix(website): fix WASM loading race condition and format parsing (#371) #4

fix(website): fix WASM loading race condition and format parsing (#371)

fix(website): fix WASM loading race condition and format parsing (#371) #4

Workflow file for this run

name: Deploy Website
on:
push:
branches: [main]
paths:
- 'website/**'
- 'docs/**'
- 'wasm/**'
- 'CHANGELOG.md'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build WASM
run: |
cd wasm && make build
mkdir -p ../website/public/wasm
cp playground/gosqlx.wasm ../website/public/wasm/
cp playground/wasm_exec.js ../website/public/wasm/
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install and build website
run: |
cd website
npm ci
npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4