[feat] 신고/차단 기능 구현 #88
Workflow file for this run
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: NMNB DEV CI/CD | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| types: | |
| - closed | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| DOCKER_IMAGE_NAME: ${{ secrets.DOCKER_IMAGE_NAME }} | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: 17 | |
| distribution: 'adopt' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build -x test | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build bootstrap image | |
| run: docker build --no-cache -f nmnb-bootstrap/Dockerfile -t $DOCKER_IMAGE_NAME:dev-mvc ./ | |
| - name: Build webflux image | |
| run: docker build --no-cache -f nmnb-webflux-bootstrap/Dockerfile -t $DOCKER_IMAGE_NAME:dev-webflux ./ | |
| - name: Push Docker images | |
| run: | | |
| docker push $DOCKER_IMAGE_NAME:dev-mvc | |
| docker push $DOCKER_IMAGE_NAME:dev-webflux | |
| - name: SSH into EC2 and deploy | |
| uses: appleboy/ssh-action@v0.1.10 | |
| with: | |
| host: ${{ secrets.SSH_HOST }} | |
| username: ${{ secrets.SSH_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| cd /home/ubuntu/nmnb | |
| git fetch origin develop | |
| git reset --hard origin/develop | |
| git clean -fd | |
| chmod +x scripts/dev-deploy.sh | |
| scripts/dev-deploy.sh ${{ github.sha }} |