[PR] Adding deployment guide #2
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: Build & Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.13.5" | |
channel: "stable" | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Flutter analyze | |
run: flutter analyze | |
# Your project will need to have tests in test/ and a dependency on | |
# package:test for this step to succeed. | |
- name: Run tests | |
run: flutter test --coverage | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: coverage/lcov.info | |
verbose: true | |
# Continuous Deployment to Fly.io | |
# https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ | |
# flutter_deploy: | |
# name: Deploy Flutter app | |
# runs-on: ubuntu-latest | |
# | |
# needs: [build] | |
# # https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions | |
# if: github.ref == 'refs/heads/main' | |
# env: | |
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# | |
# - name: Install Flutter | |
# uses: subosito/flutter-action@v2 | |
# with: | |
# channel: 'stable' | |
# | |
# # Your project will need to have tests in test/ and a dependency on | |
# # package:test for this step to succeed. Note that Flutter projects will | |
# # want to change this to 'flutter test'. | |
# - name: Check build | |
# run: flutter analyze | |
# | |
# - name: Create release build | |
# # github.com/dwyl/app/issues/315#issuecomment-1443747737 | |
# run: flutter build web --release --web-renderer html | |
# | |
# | |
# # See https://github.com/dwyl/app/issues/326. | |
# # This will fetch files concurrently needed for the app and not wait for `flutter.js` to load | |
# - name: Run post-build script to download files concurrently | |
# run: | | |
# chmod +x ./build_tools/patch_web.sh | |
# sh ./build_tools/patch_web.sh --ignore-whitespace | |
# | |
# - uses: superfly/[email protected] | |
# with: | |
# args: "deploy" |