GiancarloCode/flutter_web_example

๐Ÿ”ฅ๐Ÿš€ I teach you how to create your first Web App with Flutter and use GitHub Actions to automatically deploy it to GitHub Pages every time you push to the repository.

โ˜… 5Forks 1DartGitHub โ†—Compare
continous-integrationflutterflutter-webgithub-actionsgithub-pagestutorial

README

flutter_web_example

๐Ÿ”ฅ๐Ÿš€ I teach you how to create your first Web App with Flutter and use GitHub Actions to automatically deploy it to GitHub Pages every time you push to the repository.

Workflow

.github/workflows/flutter_web.yaml

name: Flutter Web

on:
  push:
    branches:
      - master
      
jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      
    - name: Setup Flutter
      uses: subosito/flutter-action@v1
      with:
        channel: 'beta'
        
    - name: Enable Flutter web 
      run: flutter config --enable-web
      
    - name: Install dependencies
      run: flutter packages get
      
    - name: Build web
      run: flutter build web
      
    - name: Deploy
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.token }}
        publish_dir: ./build/web

Contributors

GiancarloCode

Issues