Update cors #10
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 Splitly Web to VPS | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| name: Deploy to Production Server | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to VPS via SSH | |
| uses: appleboy/ssh-action@v1.0.0 | |
| with: | |
| host: ${{ secrets.VPS_HOST }} | |
| username: ${{ secrets.VPS_USERNAME }} | |
| key: ${{ secrets.VPS_SSH_KEY }} | |
| port: 22 | |
| timeout: 300s | |
| script: | | |
| # Navigate to project directory | |
| cd ~/splitly | |
| # Pull latest changes | |
| git fetch origin | |
| git reset --hard origin/main | |
| # Install API dependencies | |
| cd ~/splitly/api | |
| npm install --production | |
| # Install and build Web dependencies | |
| cd ~/splitly/web | |
| npm install | |
| npm run build | |
| # Restart PM2 processes | |
| pm2 restart splitly-api splitly-web | |
| # Show status | |
| pm2 status | |
| echo "✅ Deployment completed!" |