[fix/#102] 자녀 화면 보상 상태별 조회 필터 기능 수정 (#103) #41
This file contains hidden or 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: Deploy to EC2 | |
| on: | |
| push: | |
| branches: [ develop ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew bootJar -x test | |
| - name: Copy jar to EC2 | |
| run: | | |
| echo "${{ secrets.EC2_SSH_KEY }}" > key.pem | |
| chmod 600 key.pem | |
| rsync -avz -e "ssh -i key.pem -o StrictHostKeyChecking=no" \ | |
| build/libs/server-0.0.1-SNAPSHOT.jar \ | |
| ubuntu@${{ secrets.EC2_HOST }}:/home/ubuntu/app.jar | |
| rm -f key.pem | |
| - name: Restart application | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ubuntu | |
| key: ${{ secrets.EC2_SSH_KEY }} | |
| script: | | |
| sudo fuser -k 8080/tcp || true | |
| nohup java -jar -Dspring.profiles.active=prod ~/app.jar > ~/app.log 2>&1 & | |
| sleep 5 | |
| echo "Server started" | |
| - name: Notify Discord on success | |
| if: success() | |
| uses: sarisia/actions-status-discord@v1 | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: success | |
| title: "배포 성공 🎉" | |
| description: "develop 브랜치 배포가 완료되었습니다." | |
| - name: Notify Discord on failure | |
| if: failure() | |
| uses: sarisia/actions-status-discord@v1 | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: failure | |
| title: "배포 실패 ❌" | |
| description: "배포 중 오류가 발생했습니다." |