diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 8dacab29..2a1bfa14 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -52,7 +52,9 @@ jobs: run: cd infrastructure/terraform && terraform plan -var-file=${{ github.event.pull_request.base.ref }}.tfvars - name: Terraform Workspace - run: cd infrastructure/terraform && terraform workspace new ${{ github.event.pull_request.base.ref }} + run: | + cd infrastructure/terraform + terraform workspace select ${{ github.event.pull_request.base.ref }} || terraform workspace new ${{ github.event.pull_request.base.ref }} - name: Deploy to Dev if: github.event.pull_request.base.ref == 'dev' && github.event.pull_request.merged == true