diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 5b3f9b4..4740fa4 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -2,18 +2,15 @@ name: Deploy Spring Boot App on: - workflow_run: - workflows: [Backend CI] - types: - - completed + push: + branches: + - dev jobs: deploy: # 실행 환경 설정 runs-on: ubuntu-latest environment: envs - # 이전 워크 플로우 성공시 - if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: # 저장공간 설정 @@ -62,24 +59,4 @@ jobs: echo "S3_BUCKET_NAME=${{ secrets.S3_BUCKET_NAME }}" >> ./backend.env echo "S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }}" >> ./backend.env echo "S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}" >> ./backend.env - docker-compose -f docker-compose_for_action.yml up -d - - -# - name: Build Docker Image -# run: | -# docker build -t your-docker-username/your-image-name:latest . -# docker login -u your-docker-username -p ${{ secrets.DOCKER_PASSWORD }} -# docker push your-docker-username/your-image-name:latest -# -# - name: Deploy to Server -# run: | -# scp build/libs/*.jar username@server_ip:/path/to/deployment/directory -# ssh username@server_ip "sudo systemctl restart your-spring-boot-service" -# env: -# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} -# -# - name: Deploy Docker Compose -# run: | -# ssh username@server_ip "cd /path/to/docker-compose-directory && docker-compose up -d" -# env: -# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + docker-compose -f docker-compose_for_action.yml up -d \ No newline at end of file