Update main.yml #4
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: Deploy Flutter Web App to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.0.0' # Specify your Flutter version here | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Check for Outdated Dependencies | |
run: flutter pub outdated || true # Continue even if there are outdated dependencies | |
- name: Upgrade Dependencies | |
run: flutter pub upgrade | |
- name: Build web app | |
run: flutter build web | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build/web |