Fix - Testing CD #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Deploy application | |
id: deployApplicaiton | |
run: | | |
deploymentId=$(aws deploy create-deployment \ | |
--application-name PiggyWallet-backend \ | |
--deployment-config-name CodeDeployDefault.OneAtATime \ | |
--deployment-group-name CodeDeployGitHubDemo-DepGrp \ | |
--description "Automatic deployment of ${{github.sha}}" \ | |
--github-location repository=Kalgoc/piggy-wallet-backend,commitId=${{github.sha}} | jq -r '.deploymentId') | |
echo "deploymentId=$deploymentId" >> $GITHUB_OUTPUT | |
- name: Wait for deployment to finish | |
run: aws deploy wait deployment-successful --deployment-id ${{ steps.deployApplicaiton.outputs.deploymentId }} |