Skip to content

Commit 3c0caaf

Browse files
committed
ci: change when job run
1 parent d2752fe commit 3c0caaf

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/pages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ permissions:
1919
contents: write # for committing to gh-pages branch.
2020

2121
jobs:
22+
tests:
23+
uses: ./.github/workflows/rust.yml
2224
build-github-pages:
2325
runs-on: ubuntu-latest
26+
needs: tests
2427
steps:
25-
- uses: actions/checkout@v4 # repo checkout
28+
- uses: wykies/checkout@main
2629
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm
2730
with:
2831
profile: minimal

.github/workflows/rust.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
on: [push, pull_request]
2-
31
name: CI
42

53
concurrency:
64
group: ${{ github.workflow }}-${{ github.ref }}
75
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- develop
11+
pull_request:
12+
types: [ opened, synchronize, reopened ]
13+
branches:
14+
- develop
15+
workflow_call:
816

917
env:
10-
# --cfg=web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses
11-
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
12-
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
1318
RUSTFLAGS: -D warnings --cfg=web_sys_unstable_apis
1419
RUSTDOCFLAGS: -D warnings
1520

0 commit comments

Comments
 (0)