Auto-deploy examples to GitHub Pages #1
Workflow file for this run
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
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' |