File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 SERVER_SSH_PASSPHRASE : ${{ secrets.DEV_SERVER_SSH_PASSPHRASE }}
1919 DEPLOY_PATH : choose-tale/Backend
2020 BRANCH : ${{github.ref_name}}
21+ PORT : IF [ "${{ inputs.dev_command }}" = "yarn dev:test" ]; then 6001; else 5001; fi
2122
2223jobs :
2324 deploy :
4950 git fetch --all
5051 git pull origin ${{ env.BRANCH }}
5152 yarn install --frozen-lockfile
53+
54+
55+ if [ "${{ inputs.dev_command }}" = "yarn dev:test" ]; then
56+ lsof -ti:6001 | xargs kill -9 || true
57+ elif [ "${{ inputs.dev_command }}" = "yarn dev" ]; then
58+ lsof -ti:5001 | xargs kill -9 || true
59+ fi
5260 ${{ inputs.dev_command }}
5361 EOF
5462
63+ - name : 원격 서버에 배포 완료
64+ run : |
65+ curl -X POST -H 'Content-type: application/json' --data '{"text":"배포가 완료되었습니다. port: ${{ env.PORT }} , branch: ${{ env.BRANCH }}"}' $SLACK_WEBHOOK_URL
66+
5567 - name : SSH 키 정리
5668 run : rm -rf ~/.ssh
You can’t perform that action at this time.
0 commit comments