Skip to content

Full build with test and removed waiting in deploy.yml #8

Full build with test and removed waiting in deploy.yml

Full build with test and removed waiting in deploy.yml #8

Workflow file for this run

name: "Terraform Infrastructure"
on:
push:
branches:
- "main" # Safety: Only run on main branch
paths:
- "terraform/**" # Only run if files in this folder change
jobs:
terraform:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
- name: Terraform Init & Apply
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "ap-southeast-1" # Ensure this matches your provider
run: |
terraform init
terraform apply -auto-approve