deploy command 수정 #138
Workflow file for this run
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
- feat/serveractions | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prepare deploy key | |
run: | | |
echo "${{secrets.SSH_KEY}}" > deploy_key | |
chmod 600 ./deploy_key | |
- name: SSH Remote Commands | |
uses: appleboy/[email protected] | |
with: | |
host: ${{secrets.SSH_HOST}} | |
username: ${{secrets.SSH_USER}} | |
key: ${{secrets.SSH_KEY}} | |
script: | | |
cd ~/csereal_web | |
npm run build | |
pm2 stop csereal_front | |
pm2 --name csereal_front start npm -- start |