Skip to content

frontend: debounce player search requests #31

frontend: debounce player search requests

frontend: debounce player search requests #31

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
environment: production
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.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Deploy via SSH
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} '
set -e
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
cd /home/modl/modl-panel
git stash
git pull origin main
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: Notify on failure
if: failure()
run: |
echo "Production deployment failed! Check the logs."