mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Basic render to html implementation. * Remove HtmlWriter. * Escape html content. * Add non-suspense tests. * Add Suspense tests. * Gated "ssr" feature. * Add example. * Fix tests. * Fix docs. * Fix heading size. * Remove the unused YewRenderer. * Remove extra comment. * unify naming. * Update docs. * Update docs. * Update docs. * Isolate spawn_local. * Add doc flags. * Add ssr feature to docs. * Move ServerRenderer into their own file. * Fix docs. * Update features and docs. * Fix example. * Adjust comment position. * Fix effects being wrongly called when a component is suspended. * Fix clippy. * Uuid & no double boxing. Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
85 lines
2.2 KiB
YAML
85 lines
2.2 KiB
YAML
name: Publish Examples
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# leave empty for /
|
|
PUBLIC_URL_PREFIX: ""
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
profile: minimal
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- uses: jetli/trunk-action@v0.1.0
|
|
with:
|
|
# Optional version of trunk to install(eg. 'v0.8.1', 'latest')
|
|
version: 'latest'
|
|
|
|
- uses: jetli/wasm-bindgen-action@v0.1.0
|
|
with:
|
|
# Optional version of wasm-bindgen to install(eg. '0.2.68', 'latest')
|
|
version: 'latest'
|
|
|
|
- name: Build examples
|
|
run: |
|
|
output="$(pwd)/dist"
|
|
mkdir "$output"
|
|
|
|
for path in examples/*; do
|
|
if [[ ! -d $path ]]; then
|
|
continue
|
|
fi
|
|
|
|
example=$(basename "$path")
|
|
|
|
# multi_thread doesn't work yet. See <https://github.com/thedodd/trunk/issues/40>.
|
|
if [[ "$example" == "agents" ]]; then
|
|
continue
|
|
fi
|
|
|
|
# web_worker_fib does not compile with trunk. See <https://github.com/thedodd/trunk/issues/46>.
|
|
if [[ "$example" == "web_worker_fib" ]]; then
|
|
continue
|
|
fi
|
|
|
|
# ssr does not need trunk
|
|
if [[ "$example" == "simple_ssr" ]]; then
|
|
continue
|
|
fi
|
|
|
|
echo "building: $example"
|
|
(
|
|
cd "$path"
|
|
dist_dir="$output/$example"
|
|
|
|
trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX/$example"
|
|
)
|
|
done
|
|
|
|
- name: Deploy to Firebase
|
|
uses: siku2/action-hosting-deploy@v0
|
|
with:
|
|
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
|
firebaseToken: "${{ secrets.FIREBASE_TOKEN }}"
|
|
channelId: live
|
|
targets: examples
|