Skip to content

initial commit

initial commit #6

name: Deploy Playground
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
id-token: write
pages: write
concurrency:
group: playground-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Pages
id: pages
uses: actions/configure-pages@v5
- name: Set up Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version: 22
cache: true
run-install: |
args: ["--frozen-lockfile"]
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
rustup target add wasm32-unknown-unknown
- name: Install WebAssembly linker
run: |
sudo apt-get update
sudo apt-get install --yes lld
- name: Build playground
env:
PAGES_BASE_PATH: /${{ github.event.repository.name }}/
run: vp run playground:build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./playground/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4