From 8a3c584d21e550dba0d497b90cea821320e397ce Mon Sep 17 00:00:00 2001 From: Alexandra Kirk Date: Wed, 6 Nov 2024 13:23:18 -0700 Subject: [PATCH] only execute deploy action on push to dev branch --- .github/workflows/cicd.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 088a11ec..c2f4a220 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -7,9 +7,7 @@ permissions: on: push: branches: - - main - dev - - production pull_request: branches: - main @@ -36,12 +34,8 @@ jobs: - name: Set the environment based on the branch id: define_environment run: | - if [ "${{ github.ref }}" = "refs/heads/main" ]; then - echo "env_name=staging" >> $GITHUB_OUTPUT - elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then + if [ "${{ github.ref }}" = "refs/heads/dev" ]; then echo "env_name=development" >> $GITHUB_OUTPUT - elif [ "${{ github.ref }}" = "refs/heads/production" ]; then - echo "env_name=production" >> $GITHUB_OUTPUT fi - name: Print the environment run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}"