Files
tomsideguide 6f0a15795e feat: add wasm bindings, @firecrawl/anydoc-wasm, and a browser demo
- wasm/ crate with wasm-bindgen bindings mirroring the lib API
  (formatFromBytes/Extension/Path, toMarkdownBytes, toDocument)
- static demo page under wasm/www, deployed to GitHub Pages on push
- @firecrawl/anydoc-wasm published from release.yml with provenance
- wasm job in CI: clippy on the wasm target plus a Node smoke test
- version guard now spans five locations (wasm/Cargo.toml added)
2026-08-05 14:55:34 +01:00

53 lines
1.4 KiB
YAML

name: Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build site
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install wasm-pack
run: >
curl -sSfL https://github.com/wasm-bindgen/wasm-pack/releases/download/v0.15.0/wasm-pack-v0.15.0-x86_64-unknown-linux-musl.tar.gz
| tar xz --strip-components=1 -C /usr/local/bin wasm-pack-v0.15.0-x86_64-unknown-linux-musl/wasm-pack
# --out-dir is crate-relative: the module lands in wasm/www/pkg, where
# index.html imports it from.
- run: wasm-pack build wasm --release --target web --no-pack --out-dir www/pkg
- name: Assemble site
run: |
mkdir -p _site
cp -r wasm/www/. _site/
rm -f _site/pkg/.gitignore
- uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4