Skip to content

Commit

Permalink
fix web deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
waozixyz committed Sep 23, 2024
1 parent 3334ca9 commit d6f5960
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/netlify_web_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Flutter Web Build and Deploy to Netlify
on:
push:
branches:
- dev
tags:
- '*'
- main

env:
FLUTTER_VERSION: '3.24.3'
Expand All @@ -20,7 +18,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
submodules: recursive

- name: Cache Flutter SDK and dependencies
uses: actions/cache@v2
Expand All @@ -31,23 +29,25 @@ jobs:
key: ${{ runner.os }}-flutter-${{ env.FLUTTER_VERSION }}-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-flutter-${{ env.FLUTTER_VERSION }}-
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Install Dependencies
run: flutter pub get

- name: Build Web
run: flutter build web --release

- name: Install Netlify CLI
run: npm install -g netlify-cli

- name: Deploy to Netlify
run: netlify deploy --prod --dir=./build/web --site=$NETLIFY_SITE_ID
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: './build/web'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

0 comments on commit d6f5960

Please sign in to comment.