Add axios and xml2js to API dependencies #58
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 to VM | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up SSH | |
| uses: webfactory/ssh-agent@v0.8.0 | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Test SSH connection | |
| run: | | |
| ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "echo ✅ SSH connection works!" | |
| - name: Copy files to VM | |
| run: | | |
| rsync -avz -e "ssh -o StrictHostKeyChecking=no" . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/opt/simradar24 | |
| - name: Deploy on VM | |
| run: | | |
| ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' | |
| cd /opt/simradar24 | |
| docker compose -f docker/docker-compose.prod.yml down | |
| docker compose -f docker/docker-compose.prod.yml pull || true | |
| docker compose -f docker/docker-compose.prod.yml build --no-cache | |
| docker compose -f docker/docker-compose.prod.yml up -d --remove-orphans | |
| EOF |