added directory change to github actions yml

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-05 19:06:38 +01:00
parent 8422a5c84a
commit 9f37585170

View file

@ -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