From 833a37e9a65e3743af0c40a42a634fff591fbbfb Mon Sep 17 00:00:00 2001 From: SwiftyOS Date: Tue, 19 Sep 2023 12:02:35 +0200 Subject: [PATCH] Added action to build and commit the frontend --- .github/workflows/build-frontend.yml | 26 ++++++++++++++++++++++++++ frontend/.gitignore | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-frontend.yml diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml new file mode 100644 index 00000000..e29a5a75 --- /dev/null +++ b/.github/workflows/build-frontend.yml @@ -0,0 +1,26 @@ +name: Build and Commit Frontend +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Setup Flutter + uses: subosito/flutter-action@v1 + with: + flutter-version: '3.13.2' + - name: Build Flutter Web + run: | + cd frontend + flutter build web --base-href /app/ + - name: Commit and Push + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add frontend/build/web + git commit -m "Update frontend build" -a + git push diff --git a/frontend/.gitignore b/frontend/.gitignore index 24476c5d..036283f8 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -30,7 +30,8 @@ migrate_working_dir/ .packages .pub-cache/ .pub/ -/build/ +/build/* +!/build/web/ # Symbolication related app.*.symbols