From 7ec6e2450907c01c912e774a613703ddb2c64228 Mon Sep 17 00:00:00 2001 From: danyelvarejao Date: Mon, 15 May 2023 17:08:32 -0300 Subject: [PATCH] wip --- .github/workflows/flutter_web.yaml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/flutter_web.yaml diff --git a/.github/workflows/flutter_web.yaml b/.github/workflows/flutter_web.yaml new file mode 100644 index 0000000..2c36e20 --- /dev/null +++ b/.github/workflows/flutter_web.yaml @@ -0,0 +1,37 @@ +name: Flutter Web + +on: + push: + branches: + - main + pull_request: + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + + - name: Setup Flutter + run: | + git clone https://github.com/flutter/flutter.git --depth 1 -b beta _flutter + echo "${GITHUB_WORKSPACE}/_flutter/bin" >> ${GITHUB_PATH} + + - name: Install + run: | + flutter config --enable-web + flutter pub get + + - name: Build + run: flutter build web + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/web \ No newline at end of file