Skip to content

Commit 1b65478

Browse files
committed
refactor(deployment): streamline Terraform deployment steps and remove redundant environment variable setting
1 parent cffe0b1 commit 1b65478

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

.github/workflows/deployment.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ jobs:
1919
deploy:
2020
runs-on: ubuntu-latest
2121
needs: [test]
22-
defaults:
23-
run:
24-
working-directory: ${{ github.ref == 'refs/heads/main' && './terraform/prod' || './terraform/dev' }}
2522

2623
steps:
2724
- uses: actions/checkout@v6
@@ -33,19 +30,8 @@ jobs:
3330

3431
- uses: hashicorp/setup-terraform@v4
3532

36-
- name: Set env vars
37-
run: |
38-
echo "ENV=${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }}" >> $GITHUB_ENV
39-
40-
- name: Terraform fmt
41-
id: fmt
42-
run: terraform fmt -check
43-
44-
- name: Terraform Validate
45-
id: validate
46-
run: make tf_apply ENV=${{ env.ENV }}
47-
4833
- name: Terraform Apply
4934
id: apply
5035
run: |
36+
ENV=${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }}
5137
make tf_apply ENV=${{ env.ENV }}

0 commit comments

Comments
 (0)