11name : Github Pages
22
3- # By default, runs if you push to main. keeps your deployed app in sync with main branch.
43on :
54 push :
65 branches :
76 - main
8- # to only run when you do a new github release, comment out above part and uncomment the below trigger.
9- # on:
10- # release:
11- # types:
12- # - published
137
148permissions :
159 contents : write # for committing to gh-pages branch.
@@ -21,22 +15,22 @@ jobs:
2115 - uses : actions/checkout@v4 # repo checkout
2216 - name : Setup toolchain for wasm
2317 run : |
24- rustup update stable
25- rustup default stable
18+ rustup update nightly
19+ rustup default nightly
2620 rustup set profile minimal
2721 rustup target add wasm32-unknown-unknown
2822 - name : Rust Cache # cache the rust build artefacts
2923 uses : Swatinem/rust-cache@v2
30- - name : Download and install Trunk binary
31- run : wget -qO- https://github.com/thedodd/ trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
24+ - name : install Trunk binary
25+ run : cargo install trunk
3226 - name : Build # build
3327 # Environment $public_url resolves to the github project page.
3428 # If using a user/organization page, remove the `${{ github.event.repository.name }}` part.
3529 # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
3630 # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
3731 # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
3832 # will obviously return error 404 not found.
39- run : ./trunk build --release --public-url $public_url
33+ run : ./build.sh --wasm --public-url " $public_url"
4034 env :
4135 public_url : " https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
4236 - name : Deploy
0 commit comments