Skip to content

Fix - Testing CD

Fix - Testing CD #24

Workflow file for this run

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 }}