[refactor] NotificationControllerDocs 수정 #53
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: CD | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Grant execute permission | |
| run: chmod +x ./gradlew | |
| - name: Build | |
| run: ./gradlew clean build -x test | |
| - name: Login Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build & Push Image | |
| run: | | |
| docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mua-backend:latest -t ${{ secrets.DOCKERHUB_USERNAME }}/mua-backend:${{ github.sha }} . | |
| docker push ${{ secrets.DOCKERHUB_USERNAME }}/mua-backend:latest | |
| docker push ${{ secrets.DOCKERHUB_USERNAME }}/mua-backend:${{ github.sha }} | |
| - name: Deploy to WAS | |
| uses: appleboy/ssh-action@v0.1.6 | |
| with: | |
| host: ${{ secrets.WAS_HOST }} | |
| username: ec2-user | |
| key: ${{ secrets.SSH_KEY }} | |
| port: 22 | |
| script: | | |
| cd /home/ec2-user | |
| docker compose pull | |
| docker compose down | |
| docker compose up -d |