mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
safely check deployment and plan
This commit is contained in:
parent
afd1973499
commit
2b01ac9f6c
1 changed files with 19 additions and 16 deletions
35
.github/workflows/deploy_terraform.yml
vendored
35
.github/workflows/deploy_terraform.yml
vendored
|
|
@ -48,29 +48,32 @@ jobs:
|
|||
|
||||
- name: Terraform Workspace
|
||||
run: |
|
||||
BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
# BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
cd infrastructure/terraform
|
||||
terraform workspace select ${BRANCH_NAME} || terraform workspace new ${BRANCH_NAME}
|
||||
# terraform workspace select ${BRANCH_NAME} || terraform workspace new ${BRANCH_NAME}
|
||||
# Until Khalim makes a different environment for us
|
||||
terraform workspace select dev
|
||||
|
||||
- name: Terraform Plan
|
||||
run: |
|
||||
BRANCH_NAME=$(echo "${{ github.ref }}" | sed -e "s/^refs\/heads\///")
|
||||
cd infrastructure/terraform && terraform plan -var-file=${BRANCH_NAME}.tfvars
|
||||
cd infrastructure/terraform && terraform plan -var-file=dev.tfvars
|
||||
|
||||
# - name: Deploy to Dev
|
||||
# if: github.ref == 'refs/heads/dev'
|
||||
# run: cd infrastructure/terraform && terraform apply -var-file=dev.tfvars -auto-approve
|
||||
# env:
|
||||
# name: dev
|
||||
|
||||
- name: Configure AWS credentials (ProdAdmin)
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: eu-west-2
|
||||
- name: Deploy to Dev
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
run: echo "hello world"
|
||||
# run: cd infrastructure/terraform && terraform apply -var-file=dev.tfvars -auto-approve
|
||||
env:
|
||||
AWS_PROFILE: "ProdAdmin"
|
||||
name: dev
|
||||
|
||||
# - name: Configure AWS credentials (ProdAdmin)
|
||||
# uses: aws-actions/configure-aws-credentials@v1
|
||||
# with:
|
||||
# aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
|
||||
# aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
|
||||
# aws-region: eu-west-2
|
||||
# env:
|
||||
# AWS_PROFILE: "ProdAdmin"
|
||||
|
||||
# - name: Deploy to Prod
|
||||
# if: github.ref == 'refs/heads/prod'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue