From 9f37585170c7dd54404302b84f025422427b2b2c Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 5 Jul 2023 19:06:38 +0100 Subject: [PATCH] added directory change to github actions yml --- .github/workflows/deploy_terraform.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index e2a2413f..aad92564 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -29,17 +29,17 @@ jobs: AWS_PROFILE: "DevAdmin" - name: Terraform Init - run: terraform init + run: cd infrastructure/terraform && terraform init - name: Terraform Plan - run: terraform plan -var-file=${{ github.event.pull_request.base.ref }}.tfvars + run: cd infrastructure/terraform && terraform plan -var-file=${{ github.event.pull_request.base.ref }}.tfvars - name: Terraform Workspace - run: terraform workspace new ${{ github.event.pull_request.base.ref }} + run: cd infrastructure/terraform && 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 - run: terraform apply -var-file=dev.tfvars -auto-approve + run: cd infrastructure/terraform && terraform apply -var-file=dev.tfvars -auto-approve env: name: dev @@ -54,6 +54,6 @@ jobs: - name: Deploy to Prod if: github.event.pull_request.base.ref == 'prod' && github.event.pull_request.merged == true - run: terraform apply -var-file=prod.tfvars -auto-approve + run: cd infrastructure/terraform && terraform apply -var-file=prod.tfvars -auto-approve env: name: prod