Merge pull request #61 from laogao/patch-1 #51
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
name: Flutter Web | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build Web | |
env: | |
my_secret: ${{secrets.commit_secret}} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Activate melos | |
run: | | |
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | |
dart pub global activate melos 2.9.0 | |
- name: Bootstrap melos | |
run: melos bs | |
- name: Run tests | |
run: melos exec --dir-exists=test -- flutter test | |
- run: | | |
cd example | |
flutter build web --release --dart-define=FLUTTER_WEB_USE_SKIA=true | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./example/build/web |