Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ sql-validator

# Git worktrees
.worktrees/
.superpowers/
Loading
Loading