-
Notifications
You must be signed in to change notification settings - Fork 258
69 lines (59 loc) · 2.15 KB
/
deploy_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
# The first run may prompt to install dependencies, hence the `--yes` flag.
run: bevy build --yes --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 --features="render bevy/bevy_gizmos" 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'
deploy:
needs: [ build ]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2