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 +