Skip to content

Commit

Permalink
chore: deploy to GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Dec 31, 2023
1 parent 89f17b3 commit 655eeeb
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
web:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: taiki-e/install-action@v2
with:
tool: wasm-pack,just,wasm-bindgen-cli
- uses: subosito/flutter-action@v1
with:
channel: stable
- run: just build-web /flutter_rust_bridge_template/
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: build/web
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ clean:
serve *args='':
flutter pub run flutter_rust_bridge:serve {{args}}

build-web href='/':
flutter build web --base-href={{href}}
cd native && wasm-pack build \
--no-pack --release --no-typescript -t no-modules -d ../build/web/pkg/native

# vim:expandtab:sw=4:ts=4
4 changes: 4 additions & 0 deletions native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ crate-type = ["cdylib", "staticlib"]
[dependencies]
anyhow = "1"
flutter_rust_bridge = "1"

# Bug: wasm-bindgen is not reexported from FRB
[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen = "0.2"

0 comments on commit 655eeeb

Please sign in to comment.