From bf0ef597145e79a865e7d69fcc03a3033b7586c6 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 14 Mar 2024 21:36:58 -0600 Subject: [PATCH] Remove Azure deployment workflow and make docker-image workflow run on PR merge --- .github/workflows/docker-image.yml | 10 +++++---- .github/workflows/main.yml | 33 ------------------------------ 2 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index cb6cfb5..f03af12 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,12 +1,14 @@ name: Publish Docker image on: - push: - branches: main - tags: - - '*' + pull_request: + types: + closed + branches: + - 'main' jobs: push_to_registry: + if: github.event.pull_request.merged == true name: Push Docker image to GitHub Packages runs-on: ubuntu-latest steps: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0b8900a..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Deploy to Azure Static Web Apps - -on: - push: - branches: main - tags: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - - - name: Install Dependencies - run: npm install - - - name: Test - run: npm run test - - - name: Deploy - uses: Azure/static-web-apps-deploy@v1 - with: - action: 'upload' - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} - output_location: dist - skip_api_build: true