-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-deploy examples to GitHub Pages
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
name: Build and deploy examples | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Reset to the latest tag | ||
run: git reset --hard $(git describe --tags --abbrev=0) | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
targets: wasm32-unknown-unknown | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
|
||
- name: Install bevy_cli | ||
run: cargo install --git https://github.com/TheBevyFlock/bevy_cli bevy_cli | ||
|
||
- name: Build color_test | ||
run: bevy build --example color_test web --bundle | ||
- name: Build paint_callback | ||
run: bevy build --example paint_callback web --bundle | ||
- name: Build render_egui_to_image | ||
run: bevy build --example render_egui_to_image web --bundle | ||
- name: Build render_to_image_widget | ||
run: bevy build --example render_to_image_widget web --bundle | ||
- name: Build side_panel | ||
run: bevy build --example side_panel web --bundle | ||
- name: Build simple | ||
run: bevy build --example simple web --bundle | ||
- name: Build simple_multipass | ||
run: bevy build --example simple_multipass web --bundle | ||
# We skip the two_windows example as it's not supported in WASM | ||
- name: Build ui | ||
run: bevy build --example ui web --bundle | ||
|
||
- name: Upload the artifacts | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'target/bevy_web/web' |