Skip to content

new deploy file

new deploy file #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/bevy_wireframe.wasm
- name: Prepare deployment
run: |
# Create index.html in the out directory
echo '<html><head><script type="module">
import init from "./bevy_wireframe.js";
init();
</script></head><body></body></html>' > out/index.html
# Copy any other necessary files (like assets) to the out directory
cp -r assets out/
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out # Deploy only the out folder