diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7e59a26c7f..5e0071a5b5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,6 +19,9 @@ jobs: - name: "Build Bevy Error Codes" run: cd generate-errors && ./generate_errors.sh + - name: "Build Bevy Examples" + run: cargo install wasm-bindgen-cli && cd generate-wasm-examples && ./generate_wasm_examples.sh + - name: "Build and deploy website" if: github.repository_owner == 'bevyengine' uses: shalzz/zola-deploy-action@master diff --git a/generate-wasm-examples/generate_wasm_examples.sh b/generate-wasm-examples/generate_wasm_examples.sh index 5b04070b44..2aa35bcd72 100755 --- a/generate-wasm-examples/generate_wasm_examples.sh +++ b/generate-wasm-examples/generate_wasm_examples.sh @@ -33,8 +33,7 @@ add_category() mkdir ../../content/examples/$category_path/$example cp -r assets ../../content/examples/$category_path/$example cp examples/$category_path/$example.rs ../../content/examples/$category_path/$example/ - # need to disable default features to not have bevy_audio - cargo build --release --target wasm32-unknown-unknown --no-default-features --features "render,bevy_winit,png" --example $example + cargo build --release --target wasm32-unknown-unknown --example $example wasm-bindgen --out-dir ../../content/examples/$category_path/$example --no-typescript --target web target/wasm32-unknown-unknown/release/examples/$example.wasm echo "+++ title = \"$example\" @@ -73,5 +72,6 @@ category_weight=0 add_category 2d rect sprite sprite_flipping sprite_sheet text2d add_category 3d 3d_scene lighting load_gltf orthographic parenting pbr texture update_gltf_scene add_category UI button text text_debug ui +add_category audio audio add_category Game breakout alien_cake_addict add_category Tools bevymark