Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
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/[email protected]
with:
host: ${{ secrets.HOSTNAME }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script:
script: |
cd python.or.kr && git pull

- name: executing remote ssh commands for deployment
Expand All @@ -26,6 +25,5 @@ jobs:
host: ${{ secrets.HOSTNAME }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script:
script: |
cd python.or.kr && bash deploy_prod.sh