Merge pull request #3 from Hestia-Homes/main

added directory change to github actions yml
This commit is contained in:
KhalimCK 2023-07-05 19:07:07 +01:00 committed by GitHub
commit 730da029dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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