From 2fe6ffa8b8fced8e99a07f273c916ec9a251ddc6 Mon Sep 17 00:00:00 2001 From: Abdulaziz Date: Sun, 18 Feb 2024 21:26:43 +0300 Subject: [PATCH] making CI only runs on merged --- .github/workflows/DeployAstro.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DeployAstro.yml b/.github/workflows/DeployAstro.yml index 228beb6..e534e88 100644 --- a/.github/workflows/DeployAstro.yml +++ b/.github/workflows/DeployAstro.yml @@ -3,8 +3,10 @@ name: Deploy Astro site to Pages on: # Runs on pushes targeting the default branch - push: - branches: ["master"] + pull_request: + types: + - closed + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -24,6 +26,7 @@ concurrency: env: BUILD_PATH: "./homepage" + jobs: build: name: Build @@ -58,6 +61,7 @@ jobs: path: ${{ env.BUILD_PATH }}/dist deploy: + if: github.event.pull_request.merged == true environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}