From 06cb56a5c4652ed75908c9867b57c9898dbdcbed Mon Sep 17 00:00:00 2001 From: Luis Fernando De Pombo <2381303+depombo@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:51:50 -0500 Subject: [PATCH] Update and rename linux.yml to main.yml --- .github/workflows/linux.yml | 37 ------------------------------------ .github/workflows/main.yml | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index ab46189..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build and Release Flutter Linux App - -on: - workflow_dispatch: # Trigger manually - -jobs: - build-and-release: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Setup Flutter - uses: subosito/flutter-action@v1 - with: - channel: stable - flutter-version-file: pubspec.yaml - - - name: Flutter version used - run: flutter --version - - - name: Install Linux deps - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build libgtk-3-dev libwebkit2gtk-4.0-dev - - - name: Install Dependencies - run: flutter pub get - - - name: Build Release App - run: flutter build linux --release - - - name: Upload Build Artifact (Linux) - uses: actions/upload-artifact@v2 - with: - name: linux-build-artifact - path: build/linux/x64/release/bundle/app diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1c934d9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: Deploy Flutter Web to Cloudflare Pages + +on: + push: + branches: + - main # Adjust this if your main branch has a different name + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml + + - name: Flutter version used + run: flutter --version + + - name: Install dependencies + run: flutter pub get + + - name: Build Flutter web + run: flutter build web --release + + - name: Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: "e4f5d18aedd28895008b8e1f6845a3bc" + projectName: "flutter-chatgpt" + directory: build/web