Skip to content

Commit

Permalink
Update gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thalals authored Feb 16, 2024
1 parent 9a4db6a commit 4923a59
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
push:
branches:
- main

env:
DEPLOY_FILE_NAME: deployfile-`date +%Y%m%d.%H%M%S`

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,8 +44,9 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: ls
run: ls
- name: Make Zip File
run: zip -qq -r ./${{ env.DEPLOY_FILE_NAME }}.zip .
shell: bash

- name: AWS credential
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -53,7 +56,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Upload to AWS S3
run: aws s3 cp ./build/libs/chatserver-0.0.1-SNAPSHOT.jar s3://${{ secrets.S3_DEPLOY_BUCKET }}/chatserver-0.0.1-SNAPSHOT-`date +%Y%m%d`.jar
run: aws s3 cp ./${{ env.DEPLOY_FILE_NAME }}.zip s3://${{ secrets.S3_DEPLOY_BUCKET }}/${{ env.DEPLOY_FILE_NAME }}.zip

# - name: Deploy EC2
# run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=cicdtest/$GITHUB_SHA.zip,bundleType=zip
Expand Down

0 comments on commit 4923a59

Please sign in to comment.