From cdbd90b54c64bd6cbdb2ce9ff53de63bfc64de19 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Wed, 11 Jun 2025 09:52:08 +0300 Subject: [PATCH] Revert "enhanced ci/cd by not running the deply jobs on the PR itself, and now we only deploy when we merged a PR to `dev` or `main`, and created a separate GitHub action that only builds and install dependencies, which only runs on the PR itself." This reverts commit f19120c75495da9f20357bbc37a9de0133bea562. --- ...e-static-web-apps-mango-bush-01e607f10.yml | 4 +++ ...static-web-apps-polite-smoke-017c65c10.yml | 6 ++++ .github/workflows/pr-check.yml | 29 ------------------- 3 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/azure-static-web-apps-mango-bush-01e607f10.yml b/.github/workflows/azure-static-web-apps-mango-bush-01e607f10.yml index 892381f3..db94e74f 100644 --- a/.github/workflows/azure-static-web-apps-mango-bush-01e607f10.yml +++ b/.github/workflows/azure-static-web-apps-mango-bush-01e607f10.yml @@ -4,6 +4,10 @@ on: push: branches: - main + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main jobs: build_and_deploy_job: diff --git a/.github/workflows/azure-static-web-apps-polite-smoke-017c65c10.yml b/.github/workflows/azure-static-web-apps-polite-smoke-017c65c10.yml index 6a91fe27..738bd279 100644 --- a/.github/workflows/azure-static-web-apps-polite-smoke-017c65c10.yml +++ b/.github/workflows/azure-static-web-apps-polite-smoke-017c65c10.yml @@ -4,12 +4,18 @@ on: push: branches: - dev + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - dev jobs: build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job steps: + - name: Checkout Code uses: actions/checkout@v3 with: diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index 621a54d3..00000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Pull Request Check - -on: - pull_request: - branches: - - dev - - main - -jobs: - setup_flutter: - runs-on: ubuntu-latest - name: Setup Flutter and Dependencies - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.27.3' - - - name: Install dependencies - run: flutter pub get - - - name: Run Flutter Build - run: flutter build web --web-renderer canvaskit -t lib/main_dev.dart