diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7ab13b5..9ffb282 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,15 +1,14 @@ name: pk web site backend deployment on: - workflow_run: - workflows: ["pk web site backend testing"] - types: [completed] - branches: [main] + push: + branches: + - main # main 브랜치에 푸시될 때만 실행 jobs: deploy: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} + steps: - name: executing remote ssh commands for update uses: appleboy/ssh-action@v1.2.1 @@ -17,7 +16,7 @@ jobs: host: ${{ secrets.HOSTNAME }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} - script: + script: | cd python.or.kr && git pull - name: executing remote ssh commands for deployment @@ -26,6 +25,5 @@ jobs: host: ${{ secrets.HOSTNAME }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} - script: + script: | cd python.or.kr && bash deploy_prod.sh - \ No newline at end of file