Merge pull request #8 from Holbiwan/dev-v1 #1
This file contains hidden or 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 Build and Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.24.0' | |
| channel: 'stable' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Enable web | |
| run: flutter config --enable-web | |
| - name: Add web platform | |
| run: flutter create . --platforms web | |
| - name: Build web | |
| run: flutter build web --release --web-renderer html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build/web |