Skip to content

Commit

Permalink
deploy with github action
Browse files Browse the repository at this point in the history
  • Loading branch information
theachoem committed Mar 14, 2024
1 parent d2e78ca commit 2fedc3d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build_flutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy Flutter

on:
push:
branches: ["develop"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

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
branch: develop

0 comments on commit 2fedc3d

Please sign in to comment.