-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
84 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 'Deploy GitHub Pages' | ||
run-name: 'Deploy GitHub Pages' | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
|
||
code-analysis: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
- name: Prepare dependencies | ||
run: | | ||
flutter --version | ||
flutter pub get | ||
cd example | ||
- name: Check Dart code formatting | ||
run: | | ||
dart format . -o none --set-exit-if-changed | ||
- name: Analyze Dart code | ||
run: | | ||
flutter analyze . | ||
deploy: | ||
needs: [code-analysis] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
- name: Prepare dependencies | ||
run: | | ||
flutter --version | ||
flutter pub get | ||
cd example | ||
- name: Build web (CanvasKit) | ||
run: | | ||
flutter build web --web-renderer canvaskit --release | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: 'github-pages' | ||
folder: 'example/build/web' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{flutter_js}} | ||
{{flutter_build_config}} | ||
|
||
_flutter.loader.load({ | ||
config: { | ||
assetBase: '/flutter_mosaic/', | ||
renderer: 'canvaskit', | ||
canvasKitVariant: 'full', | ||
canvasKitBaseUrl: '/flutter_mosaic/canvaskit/' | ||
}, | ||
serviceWorkerSettings: { | ||
serviceWorkerVersion: {{flutter_service_worker_version}}, | ||
}, | ||
onEntrypointLoaded: async function (engineInitializer) { | ||
const appRunner = await engineInitializer.initializeEngine(); | ||
await appRunner.runApp(); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters