Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jcnh01 authored Nov 20, 2023
1 parent 8e8035f commit d12af53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:

- name: Modify application.properties
run: |
sed -i 's~spring.datasource.url =.*~spring.datasource.url = '"${{ secrets.DB_URL }}"'~' ./src/main/resources/application.properties
sed -i 's~spring.datasource.username =.*~spring.datasource.username = '"${{ secrets.DB_username }}"'~' ./src/main/resources/application.properties
sed -i 's~spring.datasource.password =.*~spring.datasource.password = '"${{ secrets.DB_password }}"'~' ./src/main/resources/application.properties
sed -i 's~cloud.aws.credentials.access-key =.*~cloud.aws.credentials.access-key = '"${{ secrets.AWS_ACCESS_KEY_ID }}"'~' ./src/main/resources/application.properties
sed -i 's~cloud.aws.credentials.secret-key =.*~cloud.aws.credentials.secret-key = '"${{ secrets.AWS_SECRET_ACCESS_KEY }}"'~' ./src/main/resources/application.properties
echo "spring.datasource.url=${{ secrets.DB_URL }}" >> ./src/main/resources/application.properties
echo "spring.datasource.username=${{ secrets.DB_username }}" >> ./src/main/resources/application.properties
echo "spring.datasource.password=${{ secrets.DB_password }}" >> ./src/main/resources/application.properties
echo "cloud.aws.credentials.access-key=${{ secrets.AWS_ACCESS_KEY_ID }}" >> ./src/main/resources/application.properties
echo "cloud.aws.credentials.secret-key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ./src/main/resources/application.properties
- name: Make Zip File
run: zip -qq -r ./$GITHUB_SHA.zip .
Expand All @@ -57,4 +57,4 @@ jobs:
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip

- name: Code Deploy
run: aws deploy create-deployment --application-name $CODE_DEPLOY_APP_NAME --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name $DEPLOYMENT_GROUP_NAME --s3-location bucket=$BUCKET_NAME,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip
run: aws deploy create-deployment --application-name $CODE_DEPLOY_APP_NAME --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name $DEPLOYMENT_GROUP_NAME --s3-location bucket=$BUCKET_NAME,bundleType=zipfile,key=$PROJECT_NAME/$GITHUB_SHA.zip

0 comments on commit d12af53

Please sign in to comment.