Skip to content

Commit 4420fbb

Browse files
authored
Update cd.yml
1 parent 2ea6d17 commit 4420fbb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,23 @@ jobs:
5151
echo "mysql_password=${{ secrets.mysql_password }}" >> .env
5252
echo "jwt_key=${{ secrets.jwt_key }}" >> .env
5353
54-
- name: Zip deploy package
54+
- name: Prepare deployment package
5555
run: |
56-
zip -r ../${{ github.sha }}.zip . -x ".git/*"
56+
mkdir -p deploy
57+
cp ./build/libs/*.jar ./deploy/
58+
cp -r ./scripts ./deploy/
59+
cp .env ./deploy/
60+
cp appspec.yml ./deploy/
61+
chmod +x ./deploy/scripts/deploy.sh
62+
cd deploy
63+
zip -r ../${{ github.sha }}.zip .
5764
5865
- name: Upload to S3
5966
run: |
6067
aws deploy push \
6168
--application-name ${{ env.CODE_DEPLOY_APPLICATION_NAME }} \
6269
--s3-location s3://${{ env.S3_BUCKET_NAME }}/${{ github.sha }}.zip \
63-
--source . \
70+
--source ./deploy \
6471
--region ${{ env.AWS_REGION }}
6572
6673
- name: Deploy with CodeDeploy

0 commit comments

Comments
 (0)