Skip to content

Merge pull request #61 from tomcheung/fix/hot-reload-issue #36

Merge pull request #61 from tomcheung/fix/hot-reload-issue

Merge pull request #61 from tomcheung/fix/hot-reload-issue #36

name: Build and deploy the example to GitHub Pages
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
working-directory: ./example
- name: Replace index.html
run: mv gh_pages.index.html index.html
working-directory: ./example/web
- name: Build web
run: flutter build web --release --web-renderer=canvaskit
working-directory: ./example
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/build/web