frontend: debounce player search requests #252
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 Staging" | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| environment: staging | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup SSH | |
| uses: webfactory/ssh-agent@v0.7.0 | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Add server to known hosts | |
| run: | | |
| ssh-keyscan -H ${{ secrets.STAGING_IP }} >> ~/.ssh/known_hosts | |
| - name: Deploy via SSH | |
| run: | | |
| ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.STAGING_IP }} ' | |
| set -e | |
| export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" | |
| cd /home/modl/modl-panel | |
| git stash | |
| git pull origin dev | |
| npm i | |
| npm run build | |
| pm2 reload modl-panel --wait-ready | |
| if pm2 describe modl-panel | grep -q "online"; then | |
| echo "PM2 process is running successfully" | |
| else | |
| echo "Error: PM2 process failed to start" | |
| exit 1 | |
| fi | |
| ' | |
| # - name: Verify deployment | |
| # run: | | |
| # echo "Deployment verification completed" | |
| # if we ever add in health checks then we could use this? idk i aint gonna bother lol | |
| - name: Notify on failure | |
| if: failure() | |
| run: | | |
| echo "Deployment failed! Check the logs." |