Skip to content

Add HCDF fragment enhancement with composite visuals and frames #4

Add HCDF fragment enhancement with composite visuals and frames

Add HCDF fragment enhancement with composite visuals and frames #4

Workflow file for this run

# Deploy Dendrite WASM frontend to GitHub Pages
# Builds dendrite-web for wasm32 and deploys to GitHub Pages
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin/wasm-bindgen
~/.cargo/bin/wasm-bindgen-test-runner
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install wasm-bindgen-cli
run: |
if ! command -v wasm-bindgen &> /dev/null; then
cargo install wasm-bindgen-cli
fi
- name: Build WASM
run: |
cargo build --target wasm32-unknown-unknown -p dendrite-web --release
mkdir -p web/pkg
wasm-bindgen --out-dir web/pkg --target web --no-typescript target/wasm32-unknown-unknown/release/dendrite_web.wasm
- name: Copy assets
run: |
cp -r assets/models web/models
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'web'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4