From b8413bec4728c2a63f8c3f4a2465a17a18c97ca4 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 29 Aug 2023 11:54:28 +0800 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..04abef5 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy +on: + push: + branches: [master] +concurrency: + group: deploy + cancel-in-progress: false +jobs: + deploy: + if: ${{ secrets.CF_API_TOKEN != '' }} + runs-on: ubuntu-latest + steps: + - name: Check Out + uses: actions/checkout@v3 + - name: Setup flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + - name: Install wrangler + run: npm install wrangler -g + - name: Build web + run: flutter build web + - name: Upload + env: + CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: wrangler pages deploy build/web --branch=dev +