From 8eda5a3c101c3e7cc4b4bc298f014ae2b41fd58d Mon Sep 17 00:00:00 2001 From: Thea Choem <29684683+theachoem@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:36:23 +0700 Subject: [PATCH] deploy --- .github/workflows/build_flutter.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build_flutter.yml diff --git a/.github/workflows/build_flutter.yml b/.github/workflows/build_flutter.yml new file mode 100644 index 0000000..d96abca --- /dev/null +++ b/.github/workflows/build_flutter.yml @@ -0,0 +1,39 @@ +name: Deploy Flutter + +on: + push: + branches: ["develop"] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + flutter_version: [3.13.1] + flutter_path: ["/opt/hostedtoolcache/flutter"] + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Load Flutter SDK from Cache + uses: actions/cache@v3.2.6 + with: + path: ${{ matrix.flutter_path }} + key: ${{ runner.os }}-flutter-${{ matrix.flutter_version }} + + - name: Setup Flutter SDK + uses: subosito/flutter-action@v2.8.0 + with: + flutter-version: ${{ matrix.flutter_version }} + + - name: Install Packages + run: flutter pub get + + - name: Build Flutter Web + run: flutter build web --release + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build/web \ No newline at end of file