[Docs] README.md 작성 (#188) #21
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: express-deployment | |
| on: | |
| push: | |
| branches: [develop] | |
| jobs: | |
| deploy: | |
| name: deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to EC2 | |
| uses: appleboy/ssh-action@v1.2.2 | |
| with: | |
| host: ${{ secrets.AWS_EC2_HOST }} | |
| username: ${{ secrets.AWS_EC2_USER }} | |
| key: ${{ secrets.AWS_PRIVATE_KEY }} | |
| port: ${{secrets.SERVER_PORT}} | |
| script: | | |
| set -e | |
| cd /home/ubuntu/codeit-resources | |
| git pull origin develop | |
| pnpm install | |
| pnpm --filter=api build | |
| pm2 restart codeit-server | |
| # pm2 명령어 | |
| # pm2 delete all | |
| # cd /home/ubuntu/codeit-resources/apps/api | |
| # pm2 start pnpm --name "codeit-server" -- start |