fix (deployment); exposing waha port to the public #16
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 Backend to Development | |
| on: | |
| push: | |
| branches: | |
| - development | |
| paths: | |
| - "src/server/**" | |
| - ".github/workflows/deploy-dev-backend.yaml" | |
| jobs: | |
| deploy: | |
| name: Deploy Backend to Dev VM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy over SSH | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.DEV_SERVER_VM_HOST }} | |
| username: ${{ secrets.DEV_SERVER_VM_USER }} | |
| key: ${{ secrets.DEV_SERVER_VM_SSH_PRIVATE_KEY }} | |
| script: | | |
| set -e | |
| cd ~/sentient | |
| git pull origin development | |
| cd src/server | |
| echo "Building and deploying the backend..." | |
| docker compose down | |
| docker compose up --build -d | |
| echo "Cleaning up old Docker images..." | |
| docker image prune -f |