Feat: live mode ON : 노드 수정 #41
This file contains hidden or 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 Frontend | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to EC2 | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.REMOTE_IP }} | |
| username: ${{ secrets.REMOTE_USER }} | |
| key: ${{ secrets.REMOTE_PRIVATE_KEY }} | |
| port: ${{ secrets.REMOTE_SSH_PORT }} | |
| script: | | |
| cd /home/ubuntu/client # 프로젝트 디렉토리 | |
| rm -rf node_modules | |
| /home/ubuntu/.nvm/versions/node/v18.20.8/bin/yarn cache clean --all | |
| rm -rf ~/.cache/yarn | |
| sudo journalctl --vacuum-time=1d | |
| git pull origin main | |
| /home/ubuntu/.nvm/versions/node/v18.20.8/bin/yarn install --frozen-lockfile --production=false | |
| /home/ubuntu/.nvm/versions/node/v18.20.8/bin/yarn build |