name: Pages
on:
push:
branches: [main]
paths:
- web/**
- .github/workflows/pages.yml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build proxyless page
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl -sSf https://rustwasm.github.io/wasm-pack/installer/init.sh | sh
- name: Build WebAssembly package
run: web/build.sh
- run: npm ci
working-directory: web
- name: Build self-contained pages
run: |
node build-proxyless.mjs
node build-flash.mjs
working-directory: web
- name: Assemble Pages site
run: |
mkdir -p _site
cp web/dist/proxyless.html _site/index.html
cp web/dist/flash.html _site/flash.html
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 with:
path: _site
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346