Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
86LAK authored May 1, 2024
1 parent de97aa2 commit 88c9a38
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.x


- uses: levibostian/action-hide-sensitive-inputs@v1

- name: Set AWS Credentials as Environment Variables and Save to File
run: |
echo "$AWS_CREDENTIALS" | tr " " "\n" > credentials.txt
export $(echo "$AWS_CREDENTIALS" | tr " " "\n")
- name: Deploy to AWS
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
echo "::add-mask::${{ github.event.inputs.awsCredentials }}"
echo "${{ github.event.inputs.awsCredentials }}" > credentials.txt
export $(cat credentials.txt | xargs)
rm credentials.txt
terraform init
terraform apply -auto-approve
rm credentials.txt

0 comments on commit 88c9a38

Please sign in to comment.