회원가입 성공 #77
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: integration to EC2 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
cd-to-ec2: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run cd scripts in server | |
uses: appleboy/ssh-action@master | |
with: | |
key: ${{ secrets.EC2_PEM_KEY }} | |
host: ${{ secrets.EC2_IP }} | |
username: ${{ secrets.EC2_USER }} | |
port: ${{ secrets.EC2_SSH_PORT }} | |
script: | | |
sudo su | |
cd ./naverwebtoon-analyzer/backend/ | |
git pull | |
sudo npm install | |
sudo npm run build | |
sudo pm2 restart main |