fix: 게시글 생성/수정 시 사진 미첨부 시 발생하던 오류 수정 #34
This file contains 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 Pipeline | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
types: [ closed ] | |
concurrency: | |
group: xclone-dev-cd | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: DockerHub Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Create application.properties from secret | |
run: | | |
mkdir -p src/main/resources | |
echo "${{ secrets.APPLICATION_PROPERTIES }}" | base64 --decode > src/main/resources/application.properties | |
- name: Build and push Docker image | |
run: | | |
docker build -t kimjooyoung/xclone-backend-dev:latest . | |
docker push kimjooyoung/xclone-backend-dev:latest | |
- name: Deploy to EC2 | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USER }} | |
key: ${{ secrets.EC2_SSH_KEY }} | |
port: 22 | |
script: | | |
cd /home/ubuntu/xclone | |
sudo ./deploy.sh | |