Update PracticePage.client.tsx #90
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: 🚀 Auto Deploy to EC2 | |
| # develop 브랜치에 push 될 때마다 실행 | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup SSH key | |
| uses: webfactory/ssh-agent@v0.9.1 | |
| with: | |
| ssh-private-key: ${{ secrets.DEPLOY_KEY }} | |
| - name: Sync code to EC2 | |
| run: | | |
| rsync -e "ssh -o StrictHostKeyChecking=no" -avz --delete \ | |
| --exclude='.git*' \ | |
| --exclude='node_modules' \ | |
| --exclude='.env' \ | |
| ./ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.CLIENT_PATH }} | |
| - name: Build & Restart on EC2 | |
| run: | | |
| ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << 'EOF' | |
| cd ${{ secrets.CLIENT_PATH }} | |
| npm install | |
| npm run build | |
| pm2 restart UpAndDown-Client || pm2 start npm --name UpAndDown-Client -- run start | |
| EOF |