From d6f5960e9ccf926b2f0acab4a9aa0090ef6b180a Mon Sep 17 00:00:00 2001 From: WaoziXyz Date: Mon, 23 Sep 2024 13:09:16 +0700 Subject: [PATCH] fix web deploy --- .github/workflows/netlify_web_deploy.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/netlify_web_deploy.yml b/.github/workflows/netlify_web_deploy.yml index c438a4d..7404e8e 100644 --- a/.github/workflows/netlify_web_deploy.yml +++ b/.github/workflows/netlify_web_deploy.yml @@ -3,9 +3,7 @@ name: Flutter Web Build and Deploy to Netlify on: push: branches: - - dev - tags: - - '*' + - main env: FLUTTER_VERSION: '3.24.3' @@ -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 @@ -31,7 +29,7 @@ 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: @@ -39,15 +37,17 @@ jobs: - 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 }} \ No newline at end of file